473,804 Members | 2,989 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Net.Sock ets & Winsock 6

I'm having a tough time getting System.Net.Sock ets 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.Sock ets is saying, but when it tries to
respond System.Net.Sock ets 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(133 01)
Dim client As Socket
----
Private Sub PollTimer_Elaps ed(ByVal sender As System.Object, ByVal e As
System.Timers.E lapsedEventArgs ) Handles PollTimer.Elaps ed

Dim datBytes() As Byte

Dim datStr As String

Dim numBytes As Integer

Try

If tcpListen.Pendi ng = True Then

client = tcpListen.Accep tSocket

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

numBytes = client.Availabl e

client.Receive( datBytes)

End If

End If

client.Close()

Catch exc As Exception

Console.WriteLi ne(exc.Message)

Console.WriteLi ne(exc.StackTra ce)

Console.WriteLi ne(exc.TargetSi te)

Console.WriteLi ne(exc.GetType)

End Try

End Sub

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

Nov 20 '05 #1
0 1682

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

Similar topics

3
3711
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 tried this I don't see any diffents, I am sending 10Mb and the Send/BeginSend command doesn't wait till the data is on the remotepoint. Can somebody pls. explain this. Regards Robert.
0
385
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 to setup onconnect and onreceivedata events: 1.sock.BeginAccept, 2.sock.BeginRecieve The problem that I face is since there is no method that I can use to couple a "client close connection" event, how do I set up a server side...
2
5154
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 System.Net.Sockets library... from bench-marking tests I have done I have reached to the following conclusion: Test description: Bougth of the projects used a single IO Completion port for communication ( the managed proj used NetworkStream that use...
9
2459
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 data? How do I simulate the DataArrival event from Winsock (VB 6.0)? How can I create and alternate event? This also is the case for the tcpClient control. If you have any solution please tell me if they can be applied to the
3
2959
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 have to use the "System.Net.Sockets namespace" As I am new to VB.NET, I want to ask if anyone knows a site where I can download a sample chat application programmed in VB. NET 2003? I mean there are a lot of Chat-programm-samples out there for VB...
2
1236
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 event once the connection attempt is made to it and you would do all you had to do, close the connection and reopen. I cant seem to find out how this works with .net.sockets. The code i have seen seems to always talk about listening only the once...
0
949
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 http://www.codeguru.com/csharp/csharp/cs_network/sockets/article.php/c8781/. This application works fine for a certain amount of time, but for some unknown reason the listen socket stops receiving. When it stops is just random. The scenario is like a you unplug the network cable. The server still has status...
0
1251
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 only use winsock? So the service needs to send a message to the PC via some port say 8000. The service knows the IP address of the PC also. The system socket code sends the message and the VB6 exe has connected to the server on port 8000 but...
2
1777
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 help than Google. I dont want to do anything fancy, just connect 2 machines to chat and play chess. I used the Winsock control in VB6, and have spent the last 4 hours or so googling to the conclusion that it's been replaced (?) with namespace...
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9572
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.