473,320 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

System.Net.Sockets & Winsock 6

I'm having a tough time getting System.Net.Sockets to work with a server
that's based around Winsock 6.0. For many reasons I can't write a new server
because the server handles a number of client formats.

I'm writing a new client that should be able to connect to the Winsock-based
server. However, I can't get them to talk to each other. The server hears
and understands what System.Net.Sockets is saying, but when it tries to
respond System.Net.Sockets just acknowledges the connection.

Whatever I do (tcpClient, Socket, bufferbased or streambased) the app that
uses the socket-class just reports that the connection is just a mere
connection but that there is no data availible.

----
Dim tcpListen as New TcpListener(13301)
Dim client As Socket
----
Private Sub PollTimer_Elapsed(ByVal sender As System.Object, ByVal e As
System.Timers.ElapsedEventArgs) Handles PollTimer.Elapsed

Dim datBytes() As Byte

Dim datStr As String

Dim numBytes As Integer

Try

If tcpListen.Pending = True Then

client = tcpListen.AcceptSocket

If client.Poll(1, SelectMode.SelectRead) = True Then

numBytes = client.Available

client.Receive(datBytes)

End If

End If

client.Close()

Catch exc As Exception

Console.WriteLine(exc.Message)

Console.WriteLine(exc.StackTrace)

Console.WriteLine(exc.TargetSite)

Console.WriteLine(exc.GetType)

End Try

End Sub

---
Has anyone been into this before? Any links, pointers to articles or
tutorials?

Nov 20 '05 #1
0 1644

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert A. van Ginkel | last post by:
In news:OZ0W9RsdDHA.2432@TK2MSFTNGP10.phx.gbl... I ask the question how I can see if all the data is on the other side of the connection. I got as answer that I should use the blocking property. I...
0
by: codemechanic | last post by:
I am using the system.net.socket class sockets to setup events and callbacks to monitor client connection status in a Time server. The socket class supports the following methods which I have used...
2
by: Nadav | last post by:
Hi, I am about to write a performance critical application and I wonder what is the best way to implement it... Should I use the standart Win32 winsock DLL or should I rather use the new managed...
9
by: Gita George | last post by:
I'm trying to write a program (a pop3 mail checker) and I'm having a problem. I'm using the socket control and I've noticed that I do not have any events !? How do I use the socket to receive...
3
by: Sven | last post by:
My current application is programmed in Visual Basic 6.0 It is a server and uses the winsock-control Now I have learned that the winsock control is not (fully) supported by VB.NET and that I...
2
by: Jm | last post by:
Hi All Im trying to get a bit of background info on .net.sockets for an app that im upgrading to be .net. Under vb6 i used the winsock control and would start it listening and it would call an...
0
by: pecka | last post by:
Hello. I have an application written in C# framework 1.1. Im using the System.Net.Sockets namespace. I've been using code from...
0
by: =?Utf-8?B?TWFydGluVGVlZnk=?= | last post by:
Hi, I've read a lot about the use of system sockets in Vb.net instead of winsock fine but how do i get a vb.net service running on a 2003 server to send a message to a desktop vb6 exe that can...
2
by: com64 | last post by:
Hey all, I'm a casual/hobby programmer who's always used VB6. I'm trying out VB 2008 express edition now. I understand a few basic concepts about .Net, but am doing this by myself with no more...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.