tcp

Which .Net component should be used for tcp/ip sockets communication?

We need to talk to another system that wants to communicate to us via raw tcp/ip socket communication. What would be the appropriate .Net object, if any, to use for this? If you know of a 3rd party component, open source component, etc., that you think is better to use, please feel free to mention that as well. ...

Store a screen capture (Bitblt) in a memory buffer to send over IdTCPClient

In c++ builder 6 on windows vista ... Graphics:: TBitmap * bmpscreencapture = new Graphics::TBitmap; bmpscreencapture-> Height = Screen-> Height; bmpscreencapture-> Width = Screen-> Width; HDC ScreenSrc = GetWindowDC (0); BitBlt (bmpscreencapture-> Canvas-> Handle, 0, 0, Screen-> Width, Screen-> Height, ScreenSrc, 0, 0, SRCCOPY); Canvas...

TCP Client Connection

I have an application that I have written for my application distributed throughout the company to send data to me through our Windows 2003 server (running IIS 6.0). Small text messages get through, but larger messages containing more data (about 20 KB) are not getting through. I set the byte buffer to the TCP Client’s buffer size. I no...

How to enable TCP keep Alive for IIS?

All, I have a web site that produces reports based upon user inputs in to a web page (queries a backend DB) using classic ASP and crystal reports. If the report takes over 30 minutes to run the firewall that sits in between the client and the web server drops the connection as it has been sat idle, so the report never gets displayed t...

Network Programmer Blogs (especially for games)

What are some good network programmer blogs? I'm especially interested in people who write about multiplayer games (MMORPG/RTS/FPS/etc), but any well written blog on the subject would be great. Here's a good blog I found on another stackoverflow post: Glenn Fiedler's Networking for Game Programmers Gamasutra Blogs occasionally has arti...

Best way to monitor for a server on a TCP port

I have a remote Music Player Daemon(MPD) server running on a linux machine. I have a client listening to this stream on another linux machine. When the MPD server is asked to pause or stop the stream, it disconnects all clients connected on the TCP port. Consequently, when the server starts streaming again, the clients have to be manu...

TCP Client Server Problem

I have the following code for the server application: TcpListener recSock = new TcpListener(400); recSock.Start(); TcpClient client = recSock.AcceptTcpClient(); NetworkStream netStream = client.GetStream(); Byte[] data = new Byte[256]; int i; while((i = netStream.Read(data, 0, d...

setting the maximum segment size in the tcp header

I am putting together a port scanner as a learning exercise. My problem is I'm trying to set the maximum segment size option(MSS) in the TCP header. I had a look at tcp.h, but I'm having trouble figuring out how to set it. I was hoping there would be an option like this: tcp_header->mss(32000); Something similar to the above was in tc...

How do I test my TCP protocol app?

When creating apps that interface on various TCP protocols (apart from HTTP), we need to test our app and how it communicates with a real server. Now typically with shared hosting you can't install any low level service to talk protocols like POP3, IMAP for email, SIP or XMPP and for instant messaging. So are there "test" servers that ...

TCP Packet after the Handshake

I'm trying to get my head around TCP and parsing the massive RFC isn't helping. I believe I understand the connect and close handshakes, but I can't seem to find anything that summarizes what the actual data stream looks like. What does a TCP packet look like in between the connect and close handshakes? (particularly the header) ...

TCP Traceroute in C#

How can you perform a TCP traceroute in C#? Is it even possible? ...

Cannot connect to server externally using Twisted library in Python

I am trying to get a simple TCP server running on my server. I am using echoserv.py and echoclient.py on the Twisted examples page. When I run echoserv.py on the server, I can connect fine using the following in echoclient.py: reactor.connectTCP('localhost', 8000, factory) <- for a localhost connection reactor.connectTCP('192.168.0.250'...

Exiting a thread blocking on TCP read in C#

My server/client start a new thread "readerThread()" for reading incoming tcp traffic. This thread blocks on read(). How can i exit this readerThread(). One way is to start another thread which closes the socket when the thread is to be exited so the read would exit. is there a more cleaner/better way to do it. ...

tcp disconnect creation on windows and linux

I am running a window/linux java application which connects to a server for market information. I'm trying to test our re-connect logic and don't have access to bouncing the server. Is there a way on windows and linux to kill or interrupt a socket? ...

TCP Send does not return cause crashing process...

If a tcp server and client are connected, I'd like to determine when the client is no longer connected. I thought I can simply do this by attempting to send a message to the client and once send() returns with a -1, I can then tear down the socket. This implementation works find on Windows but the minute I try doing this on Linux with ...

c# tcp port scanner resources

hi does anyone knows of any .net library or resources that will assist me to implement a tcp port scanner? thanks ...

How do you close TCP connections gracefully without exceptions?

What is the pattern and/or how would you change the following code so that a connection can be closed gracefully from either server or client, without needing exception handling. TcpClient vs. Socket: I'm not tied to using the TcpClient client class. I wrote the following code to try to demonstrate the simplest case possible. I had bee...

Finding a dll whose CLSID is known

I've downloaded the w3sockets. Primarily using for trying to do telnet via an application. So far we've been experimenting with vbscript. In vbscript we do something like: Set socket = CreateObject("Socket.Tcp") I am trying to use this for a .net application. I need to know the dll it is hosted in. Anyway I can find this? ...

Handling dropped TCP packets in C#

Hi, I'm sending a large amount of data in one go between a client and server written C#. It works fine when I run the client and server on my local machine but when I put the server on a remote computer on the internet it seems to drop data. I send 20000 strings using the socket.Send() method and receive them using a loop which does s...

How do I prefix the length of message in TCP/IP

I'm sending messages over TCP/IP, I need to prefix message length in a char array and then send it. How do I do it? Also can you please provide an example of how to extract it at the another end. And if possible, please explain. I'm using C++ and Winsock. EDIT: string writeBuffer = "Hello"; unsigned __int32 length = htonl(writeBuffe...