Guest jcvilla Posted June 20, 2002 Posted June 20, 2002 I need some help in VB.NET regarding the WInsock Control. What happens is that I am making a very advanced messenger in VB6/C++ but then I decided to go to VB.NET but I have a problem with the winsock controll. I can make a client and a server and establish a connection but when I transmit data it executes the Winsock1_DataArrival event in the server but when i put "Winsock1.GetData (data)" it does nothing, it simply stops running the code as if nothing happened. I tryed alot of things, I tryed changing the Variable "Data" type string to type object and when I output it to a messagebox it saya "System.Byte[]". I would really apreciate some reply so that I can continue this messenger. On the meantime I am going to be searching around the Web seeking for answers. You can contact me at jcvilla@coqui.net or g5trooper@coqui.net. -Thanks Quote
*Gurus* divil Posted June 20, 2002 *Gurus* Posted June 20, 2002 You're not supposed to use the Winsock control in VB.NET. The System.Net namespace contains classes for communications, including TcpClient and TcpListener which are replacements. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Guest jcvilla Posted June 20, 2002 Posted June 20, 2002 I know that. I know I am supposed to use the System.Net.Sockets and I already made the server and the client and I also found a way to use the winsock control. The thing is that I have a program that I already made in VB6 and it uses Winsock control so I converted it and I need to fix the problem, the problem is that like TcpListener what I am receving is in a byte Array which I need to convert to string in order to see the content. I already developed some code to do this and both methods work. Thanks anyways. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.