tcp

RPC w/ PHP - agnostic to transport mechanism

For a recent project, I have a PHP script running as a CLI-based daemon. This daemon will be responsible for monitoring/controlling independent worker processes. Periodically, users will issue requests to manage workers through a PHP web front-end (CLI daemon and front-end code are on the same physical server). The front-end will need t...

How do you monitor the size of the TcpListener backlog?

I am using the TcpListener class in C# to open up new tcp connections. I am seeing some performance issues and I want to see if it's due to running over the tcp backlog. Is there some way I can check the current size of the backlog for my process? ...

how to forward udp packets over tcp (udptunnel)

how to use "udptunnel" so that i will be able to send and receive udp packets over tcp probably with an example ...

Send Packets through IPERF

I have problem and its about using IPERF . It sends one packet at a time so to use it to fuzz IPv6 I want to send 10000 or 1000000 packets at a time. Tell me if it is possible to send such quantity of packets if not then atleast how can i test on IPERF? Any sugguestions? ...

problem establishing a TCP socket connection

Hi Experts, I'm not a software person, but I could really use some advice. I'm writing a C program (cut/paste below) to establish a TCP socket connection from my Mac Pro to a Windows XP-based test-instrument sitting next to it over LAN (Ethernet). The program compiles without any warnings or errors. But executing the code using GNU Deb...

Good Linux TCP/IP monitoring tools that don't need root access?

I want to debug TCP/IP interactions for a program I'm enhancing. I don't have root access (so no tcpdump etc), but the app runs under my own id. I could use e.g. strace to intercept the system calls, but are there alternatives worth recommending over that? If so, why - what do they offer? Command line prefered (no X server installed ...

C socket: does send wait for recv to end ?

Hi, I use blocking C sockets on Windows. I use them to send updates of a data from the server to the client and vice versa. I send updates at a high frequency (every 100ms). Does the send() function will wait for the recipient recv() to receive the data before ending ? I assume not if I understand well the man page: "Successful com...

How do I continually monitor for new TCP clients?

I have a TCP server that continually monitors for new incoming clients asynchronously and adds them to a client list: public class TcpServer { public List<TcpClient> ClientsList = new List<TcpClient>(); protected TcpListener Server = new TcpListener(IPAddress.Any, 3000); private _isMonitoring = false; public TcpServer()...

Can't use ServerSocket on Android

I'm trying to listen on a port using ServerSocket on an Android device. I want to be able to connect to this port over WiFi using a computer on the same network. I get no exception when binding it to a port, however when I check netstat it says: Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 ...

TCP/IP communication in Matlab

Hello I want to build my own Matlab cluster from lots of junk computers. Anybody knows how to send data from one Matlab to another over TCP ? I need to send image chunks / .mat files and variables. Thanks, SW ...

What book should I read to learn about writing server (sockets, TCP) programs in C++/CLI?

I recently finished this book on Managed C++, and found it very interesting... But I realize the topic is woefully out-of-date now, with the advent of C++/CLI. So I'm looking for recommendations on a new book to read, something to update my knowledge of C++ and .NET. I'm especially interested in writing server applications (using socke...

C# Receiving remote commands over TCP and invoking them on WinForm (Multithreaded)

I have a console that I want to use to invoke commands on a WinForm in another computer (I'm testing it through localhost though). When the form starts, it instantiates the CommandListener to receive commands over TCP. Whenever I attempt to instantiate it without a separate thread, the winform doesn't display at all, so I used "Initiali...

Does TCP send a SYN/ACK on every packet or only on the first connection?

I have a TCP server that listens for an incoming client, then sends it one packet of data every second. I was wondering, does the SYN/ACK packet only get sent on initial connection, so it looks like this: <client connect> SYN ACK DATA DATA DATA <client disconnect> Or does it get sent with every packet, like this? <client connect> SYN...

Sending large objects over TCP: "End of Stream encountered before parsing was completed"

I keep getting an SerializationException whenever I try to deserialize a list of doubles from a NetworkStream: End of Stream encountered before parsing was completed I have a simple client server architecture: my TcpTransportClient wraps the functionality of a TcpClient and I utilize two basic methods: Send (sends a message) and...

Frustrating TCP Serialization Exception: Binary stream '0' does not contain a valid BinaryHeader

I posted a question on how to send large objects over TCP and it seems like the primary issue is solved, but now frequently I get another exception: Binary stream '0' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization. The issue is sti...

PHP Socket Server (for Android Push Notifications) - Security / Authentication Issue

Hello all... I have recently written a socket server in PHP that will be handling communication between an Android phone application and my PHP webserver. Due to the fact that Android doesn't natively support push style notifications we are going to be using our webserver as the middleware layer to handle our 'pushes'. The socket se...

TCP Networking in Gawk Works for Some Addresses but not Others

Hi All, I've been fiddling with TCP/IP networking in Gawk and am having a hard time figuring out why it behaves well with some sites but not for others. I've even tried using HTTP Live Headers in Windows to try and debug what's going on, but to no avail. The sample Gawk code below (Version 3.1.5) will work fine for the site www.sobell...

Max socket connections of one process UNIX

I have a java server (1 process) that spawns a thread for every incoming connection. I know there is a file descriptor limit of 1024 that's compiled into the kernel. Is there a limit to how many socket connections 1 process can support? ...

Practical NAT traversal for reliable network connections

I've seen and read a lot of similar questions, and the corresponding Wikipedia articles (NAT traversal, STUN, TURN, TCP hole punching), but the overwhelming amount of information doesn't really help me with my very simple problem: I'm writing a P2P application, and I want two users of my application behind NAT to be able to connect to e...

TCP packages concatenated by libpcap automatically in C under windows??

I installed wireshark in my xp system which needs libpcap lib. Well, my program needs libpcap too.. But,when i capture in my c program, i found something very interesting.. I captured a http package, whose size is more 3000 bytes. but in my program, it takes only one loop, because every ip package take less than 1500 bytes, which means, ...