hello i have a client socket application, that connect at the same time, with more than 5000 server with tcpip in linux, but when i open the socket connection, almost all connections, retrieve the error Operation now in progress.
Here my client socket connect code:
how can i doing a good thousands simultaneously socket conecction at the same time???
sorry for my english.
here my code :
struct so
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
int main()
{
int server_sockfd,client_sockfd;
int server_len,client_len;
struct sockaddr_in serve
I want to get the IP address of the computer my program is launched on, to be able then to send it to a client, but I always get 0.0.0.1 instead of the real IP address (like 127.0.0.1 for instance).
I'm currently able to get the port, but not the IP...
How can I get it, the best solution would be to be able to get it with a sockaddr_in.
Hi everyone,I got error when I run this program. I am using ubuntu 11.10.
This is my program.
I have decided to use async io for my project and simply do a single threaded loop where I try to read some data each frame from each open socket. This worked quite well and overall I'm happy with it for now. The problem is weird problems I'm having with the async sockets.
I wrote a very basic python script to port scan my system.
While I could use memcached on Debian to use the default 11211 port, but I've had great difficulty setting up unix socket,
Form what I'v read, I know that I need to create a memcache.socket and add
-s /path/to/memcache.socket
-a 0766
To /etc/memcached.conf and comment out the default connection port and IP, i.e.
-p 11211
-l 127.0.0.1
However, when I restart memcached I get internal server e
I have a simple UDP server program
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char**argv)
{
int sockfd,n;
struct sockaddr_in servaddr,cliaddr;
socklen_t len;
char mesg[1000];
sockfd=socket(AF_INET,SOCK_DGRAM,0);
bzero(&servaddr,sizeof(ser
How do I do ip-address/netmask etc. lookup on OS X (or BSD) using the python standard library function. I'm in the middle of a process and can't make my script working on Mac.