|
-
Jun 23rd, 2001, 08:02 PM
#1
Thread Starter
Member
mswinsck just isnt working..
alright well here's the scoop. last night i started programming a winsock application. then all of a sudden i tried to connect. when i couldnt connect and went back in the code and found nothing wrong. so i tried again, and still it didnt work. so i decided to start over and it still didnt work. the only time the mswinsck worked for me was when i loaded the old applications that used the ocx. to try and fix it i replaced the old mswinsck with another one i downloaded from a website. that still didnt work. does anybody know what the problem seems to be?
thanks,
-bizzy
-
Jun 23rd, 2001, 08:46 PM
#2
Frenzied Member
When you say it does not work does not connect. Are you getting an error message? Does it time out?
-
Jun 23rd, 2001, 08:48 PM
#3
Thread Starter
Member
cool west palm bch. same here !
well anyways when i connect it doesnt show an error message so i guess it does timeout.
-
Jun 23rd, 2001, 08:55 PM
#4
Frenzied Member
Cool West Palm. Is it a server / client app? I know that sounds dumb, but i might just be a server serving up. If so Post your connection Code for the Client and your receiving connection for your server.
-
Jun 23rd, 2001, 09:00 PM
#5
Thread Starter
Member
'here's the client code
Private Sub Command2_Click()
winsock1.RemoteHost = "" + Text4.Text + ""
winsock1.RemotePort = 1234
winsock1.Connect
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 strdata As String
winsock1.GetData strdata
data.Text = strdata
End Sub
'and the server code
Private Sub Form_Load()
winsock1.LocalPort = 1234
winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If winsock1.State <> sckClosed Then tcpserver.Close
winsock1.Accept requestID
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strdata As String
winsock1.GetData strdata
data.Text = strdata
End Sub
its just a simple server / client app, i use the same code for all my winsock apps but still i dont know why its connecting.
-
Jun 23rd, 2001, 09:01 PM
#6
Thread Starter
Member
-
Jun 23rd, 2001, 09:03 PM
#7
Frenzied Member
Looks fine. Hey
winsock1.RemoteHost = "" + Text4.Text + ""
Why are you adding Nothing there. Try to add the ip address, hard code it in there see how it works.
-
Jun 23rd, 2001, 09:08 PM
#8
Thread Starter
Member
ok so i did that..now it says error, address in use..
-
Jun 23rd, 2001, 09:10 PM
#9
Frenzied Member
Are you testing on the same system. Client and server. if so just use the 127.0.0.1 ip address.
-
Jun 23rd, 2001, 09:12 PM
#10
Thread Starter
Member
but i am using the local ip address.. (127.0.0.1)..
-
Jun 23rd, 2001, 09:15 PM
#11
Frenzied Member
Let me create something here. Also try the winsock app that www.vbworld.com has. It' s pretty good.
-
Jun 23rd, 2001, 09:20 PM
#12
Thread Starter
Member
looks like i got it working. i restarted my computer and fixed the registry so i guess it had some registry problem. thanks anyways!
-
Jun 23rd, 2001, 09:52 PM
#13
Frenzied Member
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
|