Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Forming and Sending Decent Sized Packets
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
andytyk




PostPosted: Tue Feb 24, 2004 4:44 pm   Post subject: Forming and Sending Decent Sized Packets

I've been working with the Net module for a while and I've been running into a few problems. It seems like that the size of the packet is limited to a single string, or in otherwords, 250 or so characters.

Is there any solution to overcome this barrier?

Thanks you for your time.
Sponsor
Sponsor
Sponsor
sponsor
shorthair




PostPosted: Tue Feb 24, 2004 5:48 pm   Post subject: (No subject)

there really isnt ,you nedto splitthe lines , you cant overcome the limit , turing will always error out , so you need to develop an error rap or a pre error trap that finds when the line value is at 24 and makes a new line , this will ruin the packet in most cases ,so you would need to really split the line at spaces , cause if you split (IE)

Quote:

JEREMY WANT TO GO OUTSIDE =

JERE
MY WANTS TO G
O OUTSIDE



it dosent translate to the same thing now does it , this is the problem i ran in to , but i may be wrong , this is just what i know
andytyk




PostPosted: Tue Feb 24, 2004 9:44 pm   Post subject: (No subject)

Hmm... the purpose of my turing program was to decode, modify, encode, and send a packet created by another program. Splitting the packet does not seem to be an ideal solution. Might have to do this in another language then...

From Turing Reference:
Quote:
If successful, Net.OpenConnection returns a network stream descriptor which can be used with the put, get, read, and write statements and eof function to send and receive data to the listening program. It is also the parameter used for the Net.CloseConnection, Net.BytesAvailable, Net.CharAvailable, Net.LineAvailable, and Net.TokenAvailable functions.


Is it possible to package the data into an array and simply "write" the array?
Tony




PostPosted: Wed Feb 25, 2004 12:56 am   Post subject: (No subject)

hmm... Net.BytesAvailable makes me think that there might be a possiblity of sending info in binary Confused just a guess though...

otherwise I would recommed using Net.CharAvailable and just send your line 1 character at a time. You could have system characters (non alphanumeric) as tags such as start, stop, etc...

lol, this is making me think of DNA encoding... entire thing in 4 nucleotide types Laughing my tomorrow's bio test might have something to do with that though Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
andytyk




PostPosted: Thu Feb 26, 2004 12:38 am   Post subject: (No subject)

Nope, to emulate the other program, it has to send as a single packet. Oh well, may just do it in C++.
Dan




PostPosted: Fri Feb 27, 2004 9:48 pm   Post subject: (No subject)

just whondering about this, what progame are u trying to emulate? and what type packets are they?
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Andy




PostPosted: Fri Feb 27, 2004 10:22 pm   Post subject: (No subject)

oh wow... andytyk ur on my msn rnt u? and we met on dragon court... wow ur AK rite?

Mod Edit: way to go off topic dodge, andytyk is from our school, dont know how you came to your "dragon court" thingie....
Catalyst




PostPosted: Sat Feb 28, 2004 9:58 pm   Post subject: (No subject)

byte == char
they're interchangeble
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: