I've written my fair share of loops around accept() or select(); fork() or Thread.start().
I'd like to avoid doing it again. I'd prefer not to re-use my own code. And I'd like to take advantage of benefits that a 'serious' framework offers, such as preforking, thread pooling, etc.
What frameworks do you recommend - in any language - th...
I have been trying to do this in ms visual studio 2008 using the winsock2 package but whenever i try to resolve the input ip address, which is valid, I get an "Invalid ip..." error. My only guess is that there is some permissions error, but I really have no clue whats wrong. Please help!
if(WSAStartup(MAKEWORD(2,2), &wsaData) != 0){
...
Hi All
In my application I fetching the updated data in every 25 second…
but some time my application crashes while fetching the updated data..
to resolve this we are planning to use socket connection for live updates
I am tried to find any sample application for socket connection or socket communication in ADC Library platform but fou...
In short I'm creating a Flash based multiplayer game and I'm now starting to work on the server-side code. Well I'm the sole developer of the project so I'm seeking a high-level socket library that works well with games to speed up my development time.
I was trying to use the Twisted Framework (for Python) but I'm having some personal ...
Hello,
I am trying to implement a function using boost asio udpSocket, that waits until data is ready to be read, or waits until a timeout expires.
using asyc_read and a async_wait, I can do something similar, but I have to read the data. I would like to do the same without reading the data
This would allow a much easier use of the ud...
I'm modifying an app in order to replace its use of select() with kqueue. select() allows one to poll for exceptional conditions:
int select(int nfds,
fd_set *restrict readfds,
fd_set *restrict writefds,
fd_set *restrict errorfds, <---- this thing here
struct timeval *restrict timeout
);
After reading the...
Hi all;
First I have a JSF application that make some sort of searches from database, but on the other hand I have been listening port for this purpose also, I start a thread that listens that port in my application bean. From the port I listen for incoming request of these searches and send responses from this port.
The situation is th...
How do you recommend making a highly scalable SSL client?
Currently, I'm using plain Sockets to connect to the Apple APNS server which requires a non-HTTP SSL sockets. I considered using the NIO library, but it is lacking a SSLSocketChannel, and I couldn't find a good library or a smooth tutorial on how to roll out your own.
...
Hi!
I have a server and a client program (both running on the same machine). The client is able to send a struct to the server with members such as "ID", "size" etc. Then I would like the server to send the ID-member (just an integer) back to the client as an ACK for validation, but I just can't figure this out despite being able to sen...
Hi,
I did search for answers already, but can't find anything similar...
I'm fairly new to C#. I need to create a program in C# using WinForms. It basically has 2 components: UI and then I need to have a process that permanently listens on a socket TCP port. If there's anything received, then I need to raise an event or something simil...
Using sockets in C, is it safe to do this in a function?
int ConnectTo(char *ip, int port){
struct sockaddr_in addr;
memset(&addr, 0, sizeof(addr));
inet_pton(AF_INET, ip, &addr.sin_addr.s_addr);
addr.sin_port = htons(port);
int sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if(connect(sock, (struct sockaddr ...
In short I'm creating a socket server so I can add multiplayer support to my Flash game (Using Actionscript 3.0 Binary Socket on the Client-End).
I decided to go with Python since I'm the sole developer of the game/server and this will be my first non-blocking socket server. I was going to use Twisted but I deiced that I would use Pyth...
While reading about OpenSSL I've stumbled upon sentence: "It would be nice if security was as
simple as linking in a different socket library when building a program".
What is this mentioned socket library? What is it used for (i.e. in Java or C#)?
...
I am building an app which sends/recv large data to/from my remote FTP server. I want to implement FTP commands over SocketConnection. I have to first open the connection and then user and then password to server, after verifying the required response I want to begin download/upload. I dn know how to begin. I have only idea :
public cl...
Hi,
I created a SocketChannel to a remote server to send and receive messages on Tomcat. To receive messages from a remote computer, I used a thread dedicated to task (only this thread will read from the socket, nothing else).
When some bytes are received at the SocketChannel (I keep polling the SocketChannel on non-blocking mode for n...
the client writes 5 bytes to the socket after every 1 second.
the server continuously reads from the socket. the buffer at the server end is 10 bytes long. so the function looks like this
read(fd, buf, 10);
the server reads 5 bytes everytime.
now the client writes 5 bytes continuously.
the server is the same. the server reads 10 byt...
Hello,
.NET allows two very similar ways to "read" from the network (assuming TCP connection):
1. TcpClient.GetStream().Read()
2. TcpClient.Client.Receive()
By looking at NetworkStream source code - it seems that it's an extra wrapper over the underlying socket, which eventually calls Socket methods.
Question: what's the benefit of...
I have a slightly unusual situation where I'm needing to maintain CLIENT tcp connections to another server for thousands of mobile users on my servers (basically the mobile devices connect to my middle tier server when they are able to, which maintains a more stable connection to the 3rd party server for the mobile devices).
Anyways, I'...
Are there any reasons for favoring named pipes over sockets for local IPC (both using win-api), effectiveness-wize, resource-wize or otherwise, since both behave very much alike (and likely to be abstracted by a similiar interface anyway), in an application that is likely to already use sockets for network purposes anyway?
I can name at...
So I'm new to socket programming. For the past day, I have been trying to figure out a problem with my "Unregister".
So far, I can register a user. But when I unregister only one byte is sent. And I'm not sure how to fix this:
Sorry for my bad coding. Scroll down to client.cpp, that is where my recv for unregister only receives 1 byte...