Ok, I studied a bit on asynchronous TCP network connection. I tried making one but failed. What I want to do is make sure the server or client is always ready to receive a chat and is able to send a chat any time. I do not want them to be on alternate mode.
e.g. Server Send while client waits to receive thus client can't send at that t...
I've got a simple TCP server and client. The client receives data:
received = sock.recv(1024)
It seems trivial, but I can't figure out how to recieve data larger than the buffer. I tried chunking my data and sending it multiple times from the server (worked for UDP), but it just told me that my pipe was broken.
Suggestions?
...
hi
I am interesting what are the limits for gen_tcp:accept function?
I mean what is max concurrent connection count?
Or how can it be configured? (gen_tcp setting, ulimit or something else)
how much get_tcp can accept connection per second?
...
I’m having trouble with a simple TCP socket with the connect() and read() function. This program works if I start the server first, and the client second. However, when I start the client first, it continues to try to connect to the server, then when I start the server, it connects but the subsequent read returns 0 bytes. This suggests t...
TCP/IP connections KeepAlives are specified to be at least once every two hours: http://tools.ietf.org/html/rfc1122#page-101. The problem is this was written in 1989 and is concerned about the cost of sending the extra KeepAlive packet! Yet it still is the default time most OS's in accordance with the spec send out KeepAlives down a conn...
What is the Mac equivalent of TCPView or CurrPorts? I've never used Mac before, so I'm clueless.
...
Hi! I need to measure the throughput of an android device. I was thinking of measuring it using a simple client-server code working with TCP, which should be quite simple. Would you say the TCP overhead would lead to an approximation within 10%/20% of the real throughput? Thanks!
...
As far as my understanding goes, once we complete the 'listen' call with bound socket, all the TCP connections initiated by the client starts succeeding, but, when the accept is called, there is a good amount of possibility that the accept call might fail (due unavailable memory or file descriptors crossing the limit etc).
I ran some s...
Hey all. I'm writing a simple client/server application (just for the experience, networking is fairly new to me) where the client sends the server data and the server outputs it to a textbox. It all works fine, except for one small detail... It seems sometimes a connection is made, but the data isn't being sent or read (can't work out w...
I'm trying to access a web server which is sitting behind a Netcomm 3G10WVR modem/router. The web server's port 80 is port forwarded to port 4476 on the router. The tcp conversation seems to proceed ok but then gets into a (seemingly) neverending loop. I exported the conversation from wireshark and deleted the irrelevant lines - the rema...
Hi i have a disconnect button click event in my SERVER application as follows.Before it dc, it will alert other clients by sending a "/exit" command.After that it will shutdown its connection.
private void stopButton_Click(object sender, EventArgs e)
{
byte[] exit_command = Encoding.ASCII.GetBytes("/exit");
g_server...
I am learning how to network program using c/c++ and I have created a server(TCP) that is suppose to respond in specific ways to messages from a client in order to do this I created a class that the server class passes the message to and returns a string to report back to the client.
Here is my problem sometimes it reports the correct s...
Are there C++ versions of PHP's fsockopen, fread, fwrite, fclose or anything similar?
I'm using Windows (MFC) and TCP if that changes anything.
...
Hi!
I have written C code for a TCP server to listen to one client at a time.. but I'm having difficulting finguring out how I can get the server to listen to multiple clients at one time.
Does any one know of a good tutorial or example explaining this?
Thanks!
...
I am trying to discover whether a TCP connection is being dropped at the server after a given interval and have written the following code;
var tcpClient = new TcpClient();
tcpClient.Client.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.KeepAlive, true);
tcpClient.Connect(Ip, Port);
var status = tcpClient.Connected ? ...
hi..
I am wanting my TCP server and client to "talk" to each other depending on what the other says. But when I run, it seems to go through one iteration, but then both the server and client seem to just "hang" there. Once I kill it on the client side, I end up getting a broken pipe error.
Can anyone interpret what I am doing wrong he...
hi..
I have developed (TCP) server to listen to a client and interact with it. Now I'm trying to adapt that server code to listen to mulitple clients. I am wanting to use select, but I'm getting confused with some of the examples and explainations I've found.
I have been reading: http://support.sas.com/documentation/onlinedoc/sasc/doc7...
What's the syntax for sending a dbus message to another machines dbus daemon using dbus-send? I see there's TCP/IP support for the destination address, but I can't find any docs on how to actually specify the address.
...
What I'm wondering is, am I allowed to do this
client_db.clients[numberOfClients].sock = listener.Accept();
For my networking class I'm writing a chat client and a server that it connects to. I have an array of client objects that contains various info about each of the people connecting to the server. Before when dealing with one cli...
This is the answer to my questions.
How to list binded/used TCP port in C#. Used modified code from jro
static void ListUsedTCPPort(ref ArrayList usedPort)
{
IPGlobalProperties ipGlobalProperties = IPGlobalProperties.GetIPGlobalProperties();
IPEndPoint[] tcpConnInfoArray = ipGlobalProperties.GetActiveTcpLis...