|
-
February 12th, 2009, 02:38 PM
#1
Trouble using Winsock from c#.net
hello,
i am trying to transalte a code from VB6 which connects to a server and communicates with it to C# (after failing to do so with interop.)
first i tried converting to socket connection(TcpClient) but the connection
didn't seem to work quite well (the connection was forcibly closed by the remote host).
now i attempt using the MSWINSCK.OCX from my C# project. but when i get
to the DataArrived event, and call the GetData method - it does not return any value
and get stuck (control does not return to my code).
while in VB6 - it works just fine.
does anybody know why this might be caused? any better ways to emulate
winsock connection from .net projects?
thanks ahead!
-
February 23rd, 2009, 07:18 AM
#2
Re: Trouble using Winsock from c#.net
I have never had any problems in C# with either TcpClient or Socket. Can you show us some code?
"the connection was forcibly closed by the remote host" means that the other side closed the connection. Maybe you sent something that it didnt expect?
"The making of software, like the making of sausages, should never be watched."
http://blog.gauffin.org - .NET Coding/Architecture
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
|