|
-
Oct 30th, 2001, 03:15 PM
#1
Need help with winsock
Hi,
I have made a simple chat program. It only works over a lan, for now. It is client/server and it communicates by TCP/IP and a port number.
Below is a little part of the source code. I want to show on the chat screen with who you are connected. Both for the client and for the server. This was easy for the client
ConnectedTo = tcpClient.RemoteHost
But now the problem, how let the server screen show with whom a connection is made??
Private Sub tcpServer_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
ConnectedTo = tcpServer.XXXXXX??
Can anyone help me with my problem??
Thanks in advance.
Hu9o
-
Nov 1st, 2001, 11:10 AM
#2
There must be someone who can help me....
-
Nov 2nd, 2001, 06:11 AM
#3
****, it has been 3 day now and still no awnser.... Looks like I am stuck here for ethernity.
-
Nov 2nd, 2001, 06:35 AM
#4
Lively Member
Keep watching, I will post the probblem to a freind. He has solved this exact problem. I'll try to get a rapid response.
regards,
Shunt on Mustafi's account
-
Nov 5th, 2001, 03:09 AM
#5
Fanatic Member
OK, download the attachment. This is the program my friend is using at present.
-
Nov 5th, 2001, 06:20 AM
#6
I have downloaded the file. Unfortunately there is no time to look at it for me now, but there will be later on the day.
Thanks not forgeting about me!
Hu9o
-
Nov 9th, 2001, 02:54 AM
#7
Hyperactive Member
On the server, when a client tries to connect to it, the Winsock1_ConnectionRequest event is triggered.
MSDN - "For TCP server applications only. The event is activated when there is an incoming connection request. RemoteHostIP and RemotePort properties store the information about the client after the event is activated."
So on the server side, it would be...
ConnectedTo = tcpServer.RemoteHostIP
hope this helps u out.
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
|