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
5
votes
2 answers

Windows Phone camera feed over UDP is "horribly" slow

I have been working on a private project where i wanted to learn how to program on a windows phone, and at a point i started to fiddle with sockets and the camera, and a great idea came to mind video feed (dumb me to even attempt). but now I'm…
Thomas Andreè Wang
  • 3,379
  • 6
  • 37
  • 53
5
votes
1 answer

.NET TcpClient/NetworkStream implementation that supports async operations and respects timeouts

Based on the number of questions, forum posts, etc, it appears that the TcpClient/NetworkStream implementation in the BCL lacks decent support for cancelling IO operations. With the addition of Async methods in .NET 4.5, this lack of cancellation…
Andrew
  • 2,605
  • 3
  • 23
  • 34
5
votes
2 answers

boost::asio async handlers invoked without error after cancellation

My code uses boost::asio and io_service in a single thread to perform various socket operations. All operations are asynchronous and every handler depends on the boost::system::error_code (particularly boost::asio::error::operation_aborted) to…
Vladimir Sinenko
  • 4,629
  • 1
  • 27
  • 39
4
votes
1 answer

Send a message back to a list of clients at any given time with async sockets in C#

Ive got an async server set up, it works perfectly by connecting, receiving and sending back a message to the connecting client. The server itself is a Game-World-Server (mmorpg style). When a user sends its position to where its located, I need to…
4
votes
2 answers

Send object to server in C#

I have a client / server application made with C#. Its working fine when i send Strings of messages to the server. But i need to send (simple) objects to the server instead of Strings. But i'm not sure how to do this. I currently have this for my…
w00
  • 26,172
  • 30
  • 101
  • 147
4
votes
1 answer

Detecting if an outgoing port is blocked

I am working on an application that uses AsyncSocket . Is there a way to check if a specific port is being blocked by a firewall?
Jorge
  • 2,056
  • 1
  • 16
  • 23
4
votes
1 answer

Tuning buffer length for reading small data from NetworkStream

How to fine tune the bufferSize while reading small data from the TcpClient/NetworkStrem? If the bufferSize is big like 1024, 4096 the Read/BeginRead blocks. If I set the bufferSize to 16, 32 it works without blocking. Does setting the bufferSize…
Samet S.
  • 475
  • 1
  • 10
  • 21
4
votes
1 answer

AsyncSocket TLS HOWTO

I am pretty new to AsyncSocket and I'm desperately trying to get it to connect to Facebook chat server (chat.facebook.com) on port 5222 (xmpp), and it does it very well. it used to work fine before facebook switched to secure sockets. Now the server…
Moshe Marciano
  • 2,349
  • 4
  • 33
  • 44
4
votes
2 answers

Using async sockets on Windows Server 2008 R2 causes 100% CPU usage

I have a fairly generic C# socket server that uses the asynchronous methods of the socket classes - BeginAccept(), BeginReceive(), etc. This server has been working great for the last 4 years at many customer sites running Win Server 2003. …
Dave Lee
  • 363
  • 1
  • 4
  • 8
4
votes
3 answers

CocoaAsyncSocket's read and write delegates are not firing & code organization

I'm trying to do the following with a modified version of the echo server example that comes with the cocoaasyncsocket library: 1) open a connection to a python script acting as a server 2) send data // works, but delegate doesn't fire 3) receive…
nflacco
  • 4,972
  • 8
  • 45
  • 78
4
votes
1 answer

iOS SDK: How can I check if a port is open?

I have not found anything yet on how to check if a port is open or not. I tried to realize it with the AsyncSocket class but it returns always TRUE although I reject all connections to that port on my server. Additionally, I tried to use the…
4
votes
1 answer

AsyncSocket in java?

How can I implement an AsyncSocket in java (specificaly on android)?
Alex1987
  • 9,397
  • 14
  • 70
  • 92
4
votes
2 answers

.NETCF Async TCP socket graceful shutdown issue

I have a TCP client/server app to communicate with a Windows CE device over an ActiveSync connection. Both the client and server utilize Asynchronous sockets (i.e. the Socket.Begin* and Socket.End* functions). When both the client and server are…
chezy525
  • 4,025
  • 6
  • 28
  • 41
4
votes
1 answer

why is time rising for more than one request to asyncio server in python?

I wrote a pythonic server with socket. that should receives requests at the same time(parallel) and respond them parallel. When i send more than one request to it, the time of answering increase more than i expected. server: import datetime import…
4
votes
2 answers

ZMQ DEALER - ROUTER Communication

I am currently working on a project that requires some communication over the network of a different data types from some entities of a distributed system and I am using ZMQ. The main goal of the project is to have a central node which services…
bgarcial
  • 2,915
  • 10
  • 56
  • 123