 |
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Very important question in winsock <Important>!!!1
Try having two winsock controls listening on different ports. This way you will know how to distinguish which data is sent (text1 or text2).
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
12-01-2005 at 01:43 AM |
|
|
Slim Shady Level: Scholar
 Registered: 11-01-2005 Posts: 46
|
Re: Very important question in winsock <Important>!!!1
But i want one port to be open...
there isn't any way else??
any way thanx for your helps..
|
|
12-01-2005 at 05:00 AM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Very important question in winsock <Important>!!!1
If there will be two texboxes, on both sender and receiver side, then you can, for instance, add a prefix "1" when sending data from Text1 and "2" when sending data from text2. And on receiver side check for prefix to see where it should be displayed. This way wou will need one winsock and one port only.
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
12-01-2005 at 11:32 PM |
|
|
Goran Level: Moderator
 Registered: 16-05-2002 Posts: 1681
|
Re: Very important question in winsock <Important>!!!1
Let me explain better:
When sending data from textbox1, send with prefix one
Winsock.senddata "1" & text1.text
When sending data from textbox2, send with prefix one
Winsock.senddata "2" & text2.text
When you received that, check for prefix
if left(news,1)="1" then
text1.text=mid(news,2)
else
text2.text=mid(news,2)
endif
____________________________
If you find the answer helpful, please mark this topic as solved.
|
|
13-01-2005 at 03:50 PM |
|
|
|
|
 |
 |