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 checking proxies with ThreadPool takes much more time than doing the same without ThreadPool?

Using this post I wrote code that checks 200 proxies for example. The timeout for a socket is 2sec. Everything is working, but the problem that Code #1 takes more than 2minutes to check 200 proxies limited to 2sec timeout. But with Code #2 it takes…
theateist
  • 13,879
  • 17
  • 69
  • 109
0
votes
2 answers

How to modify recv to implement IO/ non-blocking?

I'm trying to write a server in C, with I/O non-blocking because sometimes it goes down for flood requests. Looking around, I've notice that I/O non-blocking can solve my problem. Reading the Beej guide, I've implemented the recvtimeout function,…
user840718
  • 1,563
  • 6
  • 29
  • 54
0
votes
2 answers

Enable non-blocking socket

I have a server written in C/C++. I set the wrapper for the connection as follow: //START WRAPPER void Server::init_address(int port) { memset(&(this->serv_addr), 0, sizeof(this->serv_addr)); this->serv_addr.sin_family =…
user840718
  • 1,563
  • 6
  • 29
  • 54
0
votes
1 answer

Accessing methods from other controller problems iOS

First Controller's code: optionscontroller = [[OptionsViewController alloc] init ]; [optionscontroller setupSocket]; Second controller's code: - (void)setupSocket { udpSocket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self …
Horhe Garcia
  • 882
  • 1
  • 13
  • 28
0
votes
1 answer

Asyncsocket connection success in one wifi but not in another one

I am using cocoaasyncsocket (on an iPad) to connect to a tcp/ip server (dotnet on a PC). There are several wifi networks here. When iPad and PC are all in one specific wifi, everything works fine. But if both of them join another wifi, they couldn't…
Globalhawk
  • 148
  • 2
  • 8
0
votes
1 answer

Workaround for .NET NetworkStream.Length lack of suppport

...basically exactly what the title says. NetworkStream.Length is not implemented. What's an alternative? I'm trying to make a recursive series of async callbacks that encase calls to NetworkStream.BeginRead(...). To know when I've hit my base…
kmarks2
  • 4,755
  • 10
  • 48
  • 77
-1
votes
1 answer

opengl application listening/recieving data from a socket connection?

I'm looking to send data from iPhone app to desktop OpenGL application using sockets connection. e.g. location of texture, I have the OpenGL application running on the desktop. And a separate socket application for desktop and iPhone where I can…
Haroon
  • 27
  • 3
-1
votes
1 answer

Listen to responses from 2 TcpClient instances against the same IP, but different ports

I'm working on a TCP connection where my client connects to a server's IP on 2 different ports. So I have 2 instances of TcpClient objects, one connecting to the IP on port 9000 and the other on port 9001. The aim of 2 connections is that the server…
-1
votes
1 answer

Mutex implementation within IIS async controller action?

I have written a web service that's an Asp.Net MVC application hosted in IIS. The data from the web service isn't retrieved from a database but from another server that is accessed via TCP. We'll call this the Data Server. There can be multiple…
Corez
  • 314
  • 3
  • 18
-1
votes
1 answer

Server-Client communication send and receive data in time interval

I'm trying to make asynchronous client server program with C#. I wanna to send data every milliseconds to client without click send button. How can I do this ? My program has been already send and receive message between client and server when…
Büşra GÜL
  • 323
  • 1
  • 4
  • 16
-1
votes
1 answer

What is the correct structure of an async TCP server in Go?

I have a client sending around 500k requests (messages)/min. Each message will be around 200 bytes to 2KB. Each message will be saved in a database (like Couchbase). What is the correct way to structure a Go TCP server in terms of cores, ports,…
Donovan
  • 816
  • 1
  • 10
  • 16
-1
votes
1 answer

Asynchronous Sockets with .NET seem to have an issue with the thread pool

I have noticed the example for Asynchronous sockets sending and receiving form MSDN, linked below, does not work. What is happening is that the thread created in Receive with the BeginReceive doesn't start until the thread running on the method…
-1
votes
1 answer

Multiple async requests to api server (fire and forget)

I am new to nodejs and I am trying to call an api server with url parameters stored in a text file. The text file is a large one (around 20 gb). Now how can I read that file and make urls based on the parameters and call the api server? The api…
Poomalairaj
  • 4,888
  • 3
  • 23
  • 27
-1
votes
1 answer

Why i'm forced to Close() C# asynchronous client socket, after every transaction?

I'm trying to write an asynch socket application which transfering complex objects over across sides.. I used the example here... Everything is fine till i try send multi package data. When the transferred data requires multiple package transfer…
DortGen
  • 402
  • 2
  • 8
  • 22
-2
votes
1 answer

why use struct and not pickle for python servers

I don't understand why should I use struct for python server and not pickle struct-harder to use, can't convert python object and can only send numbers or bools pickle-easy to use and I can just convert the object it self to bytes so it easy in…
dsal3389
  • 658
  • 1
  • 7
  • 26
1 2 3
39
40