|
-
Jul 3rd, 2003, 07:39 PM
#1
Thread Starter
Lively Member
Sending file chunks and chat messages at the same time
Hi,
Is it possible to send file chunks and chat messages at the same time over a single winsock connection?
I was thinking that I could add a specific label before each file chunk or chat message before it is sent, so the receiving program could use the split function to get the label and determine what to do with the data depending on the label. For example, a file chunk would look like "CHUNK" & "|" & chunk. While a chat message would look like "MESSAGE" & "|" & strMessage. While a program is repeatedly sending file chunks to another computer, how would I send a chat message string in between the time a chunk isn't being sent?
Are there any other methods of sending file chunks and chat messages at the same time over a single winsock connection?
-
Jul 4th, 2003, 06:22 AM
#2
Fanatic Member
yes it's possible, in fact I'd recommend using tags
<DATA>datas</DATA><MSG>Messages</MSG>
or an identifier followed by a long which indicates the length of
the data,
or design a special word as end of stream, for example,
double null character.
but why would u use one winsock?
I'dn't recommend that.
Use two to simplify stuffs.
ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
Programming is fun, but only if you're not on a tight deadline 
So I consider all those working engineers sad people
VB FTP class
3 page PHP crash course
Crash Course on DX9 Managed with VB.NET covering basics till terrain creation
-
Jul 4th, 2003, 07:46 AM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|