Hey,
I'm having an issue with a socket programming job. I wrote a TCP client that sends commands via sockets/networkstream. I'm using Wireshark to look at the raw data that goes through the wires.
Everytime I send a "command" (meaning I Flush() the networkstream), the Wireshark application tells me that the checksum in the TCP Header is...
...for use in a multithreaded network server.
I want to pass data around between multiple threads. Currently I'm using sockets, with the master thread blocking on select() and workers blocking on recv(), though I feel there probably are more advanced or prepackaged ways of handling this task in C++.
...
Hello
I am trying to get my environment setup to develop an android app so I downloaded the SDK (http://developer.android.com/sdk/installing.html).
After unpacking the files and running the SDK Setup.exe, the Android SDK and AVD manager opens up.
During the installation process, I got an error stating the following:
Failed to fetch ...
On a computer with both an active Wireless Card and a LAN-Port with a crossover cable hooked up to another machine running the same application, we need to send a UDP multicast over the LAN wire to the other computer. Using C# Sockets, Windows seems to try to route the message over the WLAN adapter every time.
Is there a way to specify ...
According to the Sun's documentation on ServerSocket:
The maximum queue length for incoming connection indications (a request to connect) is set to 50. If a connection indication arrives when the queue is full, the connection is refused.
How can I increase the the queue length? It's my server's bottle-neck.
Thank you.
...
Essentially I'm sending data to a Java Socket Server from an iPhone app however something rather strange happens, it doesn't receive the data until the iPhone application is closed! I'm sure there is something I'm missing but I just can't seem to find it, it's all quite odd.
Here is how my connection is created:
-(CFSocketRef)initSocke...
hi, is it possible for the recv socket call's buffer to not match the number of bytes returned by the call? for example:
const int len = 1024;
char buf[len];
int bytes = recv(socket, buf, len, 0);
shouldn't this always be true: strlen(buf) = bytes?
thanks
edit1:
i should note that i'm aware that recv can return less than the allocat...
This code doesn't send the trailing null byte. How do I send the trailing null?
Socket.writeUTFBytes('Hello World');
Socket.flush();
Thanks in advance. :)
...
I want to implement the function like embedding the socket function in my Lua build.
So I don't need to copy socket.core.dll any more (just for fun).
I search the maillist, and see some guys discuss the topic,
http://lua-users.org/lists/lua-l/2005-10/msg00269.html
But I have question for the details steps, who could give me a detailed ...
What's the best way to turn a string in this form into an IP address: "0200A8C0". The "octets" present in the string are in reverse order, i.e. the given example string should generate 192.168.0.2.
...
Essentially I have a basic Java Socket server as you can see below. It allows multiple users to connect and when they send a message to it, it returns it back. However I was wondering how I could edit it so if a user sends a message to it, rather than just sending it back it sends it to everyone connected? So a basic chat server. Any hel...
Is POSIX pselect available in Perl? A CPAN module is fine also.
...
During the installation of my Android SDK, I am getting stuck during the process where the manager goes out and downloads all the revisions of the APIs and the SDKs.
It is potentially due to a socket issue that typically occurs when a database query is called and there are a large number of TCP connections... according to googling my er...
I've followed a tutorial to create the socket server below which allows multiple users to connect and if they send some data to it then it returns it back to them.
import java.awt.Color;
import java.awt.BorderLayout;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.net.*;
class Cl...
Could the socket function call in C return 0 or 1 as the value for the socket descriptor?
int socket(int domain, int type, int protocol);
According to the man page I have:
RETURN VALUE
-1 is returned if an error occurs; otherwise the return value is a
descriptor referencing the socket.
It seems like it could, or at l...
I have a socket where server is in JAVA but Client is in C++.
Struct{
float length;
char[] name;
}myStruct;
How can I convert the structures to a byte stream sent by Server and can be correctly parsed by Client? Any sample code would help! (I heard XML is an option but I am not familiar with it ) Thanks.
...
I am working on a mulithreaded TCP server. In the main thread i listen on a socket and create a new thread for new incomming connections. I want to save all incoming connections in a hash so that i can access them from yet another thread.
From the "monitor" thread i can not read any newly added connections. It seems a new "clients" hash...
A little background:
I've written a script that will act as a receiver for incoming Syslog/Email/Snmp(v1) traps. It receives the data and stores it as a custom defined object. My "messageSocket" is a means to control the behavior from a script outside of this general listener. I want to send messages to this to either start/stop on ...
In The Single UNIX Specification, Version 2 http://www.opengroup.org/onlinepubs/007908799/xns/syssocket.h.html claims that the param value of SO_REUSEADDR in setsockopt means:
"Reuse of local addresses is supported".
Can some clarify me that phrase?
...
c++
#define BUF_LEN 1024
the below code only receives one byte when its called then immediately moves on.
output = new char[BUF_LEN];
bytes_recv = recv(cli, output, BUF_LEN, 0);
output[bytes_recv] = '\0';
Any idea how to make it receive more bytes?
EDIT: the client connecting is Telnet.
...