|
-
Jan 19th, 2003, 04:00 AM
#1
Thread Starter
Junior Member
*URGENT* Sockets Error: "Unable to read data from the transport connection"
Hi, hope first post being a question isnt a problem 
Im trying to thread a TcpClient, but it seems like 50% of the time I get an "Unable to read data from the transport connection" error. I searched the form, and it looks like someone else had the problem but there was no solution.
Could someone who has successfully gotten a socket client to spawn indefintealy in a new thread (again, it seems to work on ocation) please enlighten me on how they did it?
Thanks.
Last edited by FireRabbit; Jan 23rd, 2003 at 07:45 PM.
-
Jan 19th, 2003, 12:52 PM
#2
Fanatic Member
-
Jan 19th, 2003, 04:25 PM
#3
Thread Starter
Junior Member
Thanks for the reply.
The problem is none of the socket documentation talks about how to run a client in another thread.
A code snippet displaying exactly how to properly do this would be very nice if anyone could put one together.
Thanks.
-
Jan 20th, 2003, 12:41 AM
#4
Fanatic Member
-
Jan 23rd, 2003, 07:45 PM
#5
Thread Starter
Junior Member
Thanks for the link, looks like very intresting stuff, but I'm still not sure exactly how to apply it to sockets.
Could anyone please provide an example? Thanks.
-
Jan 31st, 2003, 12:21 AM
#6
Thread Starter
Junior Member
-
Jan 31st, 2003, 05:04 AM
#7
Junior Member
Sockets and udp.
I had problems with UDP and sockets.
I found out that I had VMWare installed, and that made 2 lan connections beside my real lan connection. ipendpoint had to be set to my lan connection to identify which lan connection to use. It is possible to use ipendpoint.any, but that didn't work.
So the method I used was:
new socket(internetworks, datagram, ip)
socketoptions(join multicast group IP endpoint(multicastgroup))
bind(ipendpoint(lan connection IP))
recieve()
Hope this can help a little..
I'm using sockets nowadays to make a mysql client that parses a recordset into an datatable object, so it can be used with MS forms.
Sockets and .NET isn't easy. It should be, but there are some bugs that need to be fixed : UDPclient class is useless, since the recieve method is buggy...
----------------------------------------
Mail me if you want me to look further into this, but then I need some code from you and a better description for what you need to do.
-
Jan 31st, 2003, 06:44 PM
#8
Thread Starter
Junior Member
WOOHOO!
After looking into Sockets.Socket object, rather than Sockets.TCPClient on the MSDN I found that it worked flawlessly (and almost twice as fast...)! Thanks a lot.
I'll post the code later today/tomorow..once im completely done tweaking it.
On an unreated note, Ive been using www.einfodesigns.com's mysql dll and it works flawlessly (great for ASP.NET), but please let me know when yours is done.
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
|