tcplistener

Where can I find a good tutorial for using the BeginAcceptTcpClient method of a TcpListener?

I'm confused on how to use BeginAcceptTcpClient and how to set up my AsyncCallback and the state object. MSDN doesn't provide a comprehensive enough example for using this for me. How do you get the TcpClient object using this methodology? ...

How can I forcibly close a TcpListener

I have a service which communicates through tcpListener. Problem is when the user restarts the service - an "Address already in use" exception is thrown, and the service cannot be started for a couple of minutes or so. Is there's any way of telling the system to terminate the old connection so I can open a new one? (I can't just use ran...

Network error handling in silverlight 3

Hi all. We are writting silverlight3 application, which use Tcp connction. Our project use client server architecture. Client part is silverlight application, and server part is winform application. We use TcpClient and TcpListner for connection. We can handle following errors: 1. user shut down 2. users network cable unpluging 3. server...

Need assistance with TCP Reverse connection

I am creating an authentication server for some projects I'm working on. This authentication server works by receiving and transmitting data to users trying to authenticate. The user can send data to the server succesfully but when sending back it requires port forwarding. I read a way that I would not require port forwarding by using r...

open source C# proxy server - any projects/examples?

Anyone know of any open source C# proxy server projects? Otherwise any articles/tutorials that cover how to use C# classes to get proxy server basic functionality working (in particularly for HTTPS requests) The only one I have found so far (and I will look at) is: http://www.mentalis.org/soft/projects/proxy/ ...

Adding SSL to TcpListen server?

I have made a simple server using TcpListener and it works great but now I would like the connection to be secure. The clients that connect would be web servers so does it matter if the certificate is trusted or is that just for web browsers? I have found muddled answers that are not straight forward! UPDATED Ok thanks so far pleas...

TcpListener Timeout/about/something? Without ASync?

I create a thread which uses TcpListener and when my app closes i'd like the thead to terminate. I can call abort but the thread is still alive since TcpListener is blocking with AcceptTcpClient. Is it possible to about or set a timeout or to do SOMETHING with AcceptTcpClient? i cant imagine how it would be useful if theres no way to st...

What causes TcpListener Socket Error 10013?

I get error 10013. msdn says its a permission denied error. An attempt was made to access a socket in a way forbidden by its access permissions My app ran fine. I then made a code change and restarted it. I got that error. I suspected i have to reuse ports so i wrote this in and still had no luck server.Server.SetSocketOption(SocketO...

How do i handle clients better with TCPListener?

I had a problem with too many connections After a few test i deducted the problem is with MY server. The fact that the server listening port was on the left side should have told me. When running the same client code using a server on a different machine i dont get hundreds of ports opened. When my server on my local machine i get > 200...

read full xml file data over tcp

i'm developing application that is listening to the data coming to the pc and store it in a db when i'm trying to use any sniffing software it decode the data and i can read it... but in my code ...., it come in a format like that 18222621516223418171188155182116161215209411319215720415199123214130182245104534820623122586242192174262133...

read xml data over tcp

i'm developing an application that is listening to tcp to get some xml data coming from other devices. i'm use sniffing c# code, and i can sniff all the packets. my problem is that in every packet i can find a Piece of the data in every packet. like this: 1 packet from ip41 data:< 2 packet from ip41 data:?xml versi 3 packet from ip41 ...

Weird behavior: TcpListener

So, for a bit of background : This class is created to accept and respond to calls made remotely in an HTTP format. The problem is when the method of the request is POST, sometimes the request is processed correctly, but most of the times the class just ends up being irresponsive. Also, the line "Debug1" and "Debug2" are never written t...

.NET Async TcpListener / TcpClient Question...

I'm at a bit of a loss as to how to properly implement the asynchronous methods for TcpListner and TcpClient int .NET. I've read over quite a few posts on hear and I believe I have the code to accept new clients on the server taken care of. Here is the code for acception new connections: Public Sub Start() m_oListener = New TcpLis...

Can a WCF Service replace the functionality of TCPListener?

I have a TCPListener based server application which listens for clients on a single specific port. The clients connect, send some xml, get some xml back as a response and then disconnect. Is it at all possible to replace the TCPListener based application with a WCF service without any change to the clients? If so can anyone suggest reso...

Using pexpect to listen on a port from a virtualbox

Hi all, I am trying to create a tcplistener in python (using pexpect if necessary) to listen for tcp connection from Ubuntu in virtualbox on a windows xp host. I would really appreciate it, if one of you could point me in the right direction. Thank you. P.S: I have limited experience in the area, any help would be welcome. ...

C/C++ libraries for HTTP programming

What well known C/C++ libraries are out there that could allow one to implement servlets, or at least provide most of the essentials for dealing with HTTP/CGI protocols such as http headers, error codes, cookies, GET/POST etc. So far I have only found CPPSERV. EDIT: Looking for server side solutions. ...

Using Delegates to Pass Information back to UI from custom socket class

All I am in the process of prototyping a small sockets application, which monitors IT infrastructure (due to in-house financial and deployment restrictions, I am unable to utilise an existing commercial or open-source solution). Basically, I have a server application and associated agent process for communicating heart-beat data to the...

TcpClient vs MSMQ

I'm developing an application that will need to communicate with itself running on different machines located in different locations. I was going to use TcpListener and TcpClient to send information between applications but then I came across MSMQ. The computers are connected via software VPN, which communicates across my standard inte...

C# passing objects TCPListener

Hi, I am new to network programming in C#. I have found the TCPListener class very useful for sending text between computers, but I was wondering if it is possible to directly send objects (assuming both client and server have the class definition) between machines without having to first convert them to string and then make an object w...