Questions tagged [asyncsocket]

Asynchronous sockets allow for multiple simultaneous non-blocking socket connections.

Asynchronous sockets allow for multiple socket connections within a single thread. While more complicated than synchronous sockets, asyncsockets allow for more efficient use of cpu scheduling. These connections are non-blocking, which allows the main program thread to continue running, while a socket thread manages network traffic.

589 questions
0
votes
2 answers

Why does my server's performance suffer after operating for some time?

I have written server code which receives the data from servers continuously using multithreading (asynchronous) from multiple clients (more than 500). It reads data from all the clients and works properly in terms multithreading and receives all…
user3735822
  • 337
  • 2
  • 12
0
votes
1 answer

Socket programming simple example in c sharp

I create a simple application in socket programming. I think this is simple way to achieved that. so that is why I am sharing this. In this program you can create server program and client program. And you can also send and received message from…
Durgpal Singh
  • 11,481
  • 4
  • 37
  • 49
0
votes
2 answers

How to pull UIImages from NSData from a socket

I'm using ASyncSocket to move some UIImages from one device over to another. Essentially, on one device I have: NSMutableData *data = UIImageJPEGRepresentation(image, 0.1); if(isRunning){ [sock writeData:data withTimeout:-1 tag:0]; } So a new…
Daniel Amitay
  • 6,677
  • 7
  • 36
  • 43
0
votes
1 answer

C# async SocketException while binding

I am working on a client-server application on C# using async sockets. As I listen for connections, I keep getting this error An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in System.dll Additional information: Only…
ellekaie
  • 337
  • 1
  • 7
  • 21
0
votes
2 answers

Why App ceashes when I try to check socket connection status?

I am building a Remote PC control app. my code I want to start new activity only when socket connection is active or notify the user it is not active class MyActivity extends Activity { static Boolean connect; Socket client; SendMessage…
Suroor Ahmmad
  • 1,110
  • 4
  • 23
  • 33
0
votes
1 answer

Socket Server to handle multiple clients request concurrently

I want to handle multiple client's request concurrently using Socket Server. i have 10 clients, which can send request to my server at same time. How could i handle this? Is it possible? With below code, i can handle only one request at a time,…
chetan rane
  • 533
  • 2
  • 10
  • 25
0
votes
1 answer

Send 0xF8 byte over TCP

I am using Asyncsocket to send bytes over TCP. I have the code working, however when it comes to send byte 0xF8, I am having issue. Here is what I have try(in the comment below) and the codes: NSString *ip_current =…
Rabbit
  • 3
  • 2
0
votes
1 answer

I/O Completion Port for small-scale, single-threaded applications?

Let me prefix this by saying that I've never used I/O Completion Ports, though I've heard of them for years now. My background is primarily with select, poll, epoll, and WSAEventSelect coupled with WaitForMulitpleObjects. Please correct me if I have…
user1096614
0
votes
1 answer

File Transfer android

I'm working on an android application that founds all the devices connected to the same network via WiFi, now i want to send files from my android application, the receiver device may be an android device or anything else(windows or mac etc). I'm…
Shahbaz Saleem
  • 33
  • 1
  • 1
  • 4
0
votes
2 answers

Use Java to connect ethernet device

I had a board connect to the PC using LAN cable(RJ45). I need to write the Java code to connect the board and get some data from it. How can I do it? Actually I got a code from C++, it used CAsyncSocket class to do it. The C++ code is like…
user2545866
  • 31
  • 1
  • 4
0
votes
2 answers

C# SocketAsyncEventArgs and network glitches

I've implemented async sockets using SAEA in the canonical way: Have a pool of SAEAs ready for operations, keeping references so the GC doesn't have to move the memory Replace the SAEAs when operations finish. I've discovered an issue to do with…
Carlos
  • 5,991
  • 6
  • 43
  • 82
0
votes
1 answer

sendData (lib AsyncSocket) just before iPhone quit

I have an iPhone application that send datas via wifi on my mac. I would like to send a logout message to my mac when I quit the iPhone app. I tried to send it on the : -applicationWillTerminate methode but it seems that the application shut down…
Pierre
  • 10,593
  • 5
  • 50
  • 80
0
votes
1 answer

Stopping socketserver.ThreadingMixIn in python

I'm extending socketserver.ThreadingMixIn in Python 3.4 to build my own threaded server while keeping the original callbacks overwintered only for logging porpoises. The activation and creation is very simple and according to python documentation…
Eli
  • 75
  • 7
0
votes
1 answer

iOS: GCDAsyncSocket and its tag

In my app I'm using GCDAsyncSocket and I write and read in this way: NSData *bufferWriteData = [NSData dataWithBytesNoCopy:bufferWrite length:17 freeWhenDone:YES]; [self.socket writeData:bufferWriteData withTimeout:-1 tag:1]; [self.socket…
cyclingIsBetter
  • 17,447
  • 50
  • 156
  • 241
0
votes
1 answer

Server that accept multiple client

Hello all I have create a chat in python with tcp socket but the server accept only one client I tried to search but I have very difficulties to understand how to make a server that accepts multiple clients...can anyone help me?thanks
user3782573
  • 95
  • 1
  • 8