|
-
Sep 19th, 2000, 08:18 PM
#1
Thread Starter
Addicted Member
I have 2 winsock on a form ..
If the person have the password to unloack the application, he can send message :
Code:
Private Sub Command1_Click ()
Winsock1.LocalPort=52
Winsock1.connect "24.226.111.11", "51"
Winsock1.SendData "YO !"
End Sub
For the sencond winsock , I put that in the f
Code:
Private Sub Form_load ()
Winsock2.RemotePort=52
Winsock2.LocalPort=51
Winsock2.Listen
End if
So, I open the program,
I click on the button and winsock won't send anything ..!
WHY ?
Can you give me a good code to send/get ASCII data in TCP/IP
connection ??
-
Sep 19th, 2000, 10:07 PM
#2
Fanatic Member
Place this on the form/project that's listening (server)
Code:
Private Sub Form_Load()
Winsock1.Close
Winsock1.LocalPort = 136
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then _
Winsock1.Close
Winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Winsock1.GetData data, vbString
txtchat.Text = txtchat.Text & ": " & data
End Sub
Just change the names of the textboxes to whatever you used.
Gl,
D!m
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
|