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

iPhone and Node.js, multiple packets in single read

I feel like I'm doing this wrong, or it's just a result of my novice with sockets. I'm using asyncSocket on the iPhone to send data to node.js. My problem is that every so often, the app will hang, and then I'll get like 5 or 10 messages at once in…
Brent
  • 23,354
  • 10
  • 44
  • 49
0
votes
0 answers

How to use GCDAsyncSocket and imported GCDAsyncSocket.framework in swift?

I want to use GCDAsyncSocket in swift when build the project show this error Use of unresolved identifier 'GCDAsyncSocket' my code is self.socket = GCDAsyncSocket(delegate: self, delegateQueue:dispatch_get_main_queue()) I try add this to my…
linwea
  • 1
  • 2
0
votes
2 answers

How to declare AsyncSocket instance as Global

I am using AsyncSocket class for a chat application. But i want to use the AsyncSocket instance creating in the Login page for the entire project. That means i want to reuse the instance of AsyncSocket which created in the Login page for the…
Sreelash
  • 1
  • 1
  • 2
0
votes
2 answers

Does IO multiplexing on one single read-only fd help get better performance than simply blocking read on it?

According to my knowledge, I think if I only need to perform reading operation on one single fd, IO multiplexing like select/poll will not help on performance, it even causes more overhead than just reading fd blockingly. But the linux auditd…
user2828102
  • 125
  • 1
  • 12
0
votes
0 answers

Scalable sockets for server-client network i/o

I have application in which a server can send data to multiple clients. On server-side, I start 2 threads: accepting connections sending data to connected clients. Sending data function: def send_data(self): '''this function is a thread…
Abhishek Bhatia
  • 9,404
  • 26
  • 87
  • 142
0
votes
1 answer

Client And Server Socket Connection using C#

I created two projects one with client and other with server to exchange text between both of them;on same computer i run those exe. MY Client Side Connection Code connection looked : using (SocketClient sa = new SocketClient(host, port)) …
0
votes
1 answer

I can't use vector in CAsyncSocket :: OnClose ()

I am Working on a client/server Broadcast Application using CSocket. While client connect to server OnAccept Method call. In OnAccept method I am creating a object of that class and Store that pointer of object in vector. void…
PedFoot
  • 3
  • 4
0
votes
1 answer

TCP Socket client Async - connection handling

I have a problem with connection handling in TCP Client socket. This code should connect to localhost at 4444 port and listening for all incoming data from this TCP Server. I need to write connection handling for this. For example if while…
seek
  • 1,065
  • 16
  • 33
0
votes
1 answer

scan the network for a server while using AsyncSocket as a client

My app communicates with an external server using AsyncSocket as a Client. (the working code can be found here) When the app starts, the user types in the IP address of the server computer. assuming both iOS and server is sitting on the same…
chewy
  • 8,207
  • 6
  • 42
  • 70
0
votes
1 answer

swift CocoaAsyncSocket connectToHost method arguments error

I define properties as bellow: let addr:String = "192.168.31.218" let port :UInt16 = 8000 let timeout:Double = 5.0 var socket: GCDAsyncSocket! var errPtr : NSError? and I call the method as bellow: socket.connectToHost(addr, onPort: port,…
fcbflying
  • 693
  • 1
  • 7
  • 23
0
votes
1 answer

C# - C:stop blocking listen socket on a child thread

My program:I create 2 threads:Thread 1 with a listen socket,and thread 2 do somethings. But thread 1 blocks program and i can not start thread 2 until listen socket on thread 1 receives data. But i need 2 threads run at the same time,and don`t need…
voxter
  • 853
  • 2
  • 14
  • 30
0
votes
2 answers

Server port doenst get back to listen and is in closed_wait state , because of starting a daemon application from client

Below is the basic client and server code . While iam trying to start an appliaction(which has to keep running in the machine once we send a msg to server) during connect call. using system(/bin/myApplication) in the client code (This basically is a…
user2256825
  • 594
  • 6
  • 22
0
votes
1 answer

C# get and Thread class just work twice, I don't know exactly

namespace LEDServer { public class Weather { string weathervalue, weatherexplain, temperature; int temp; public void DoWork() { while (!_shouldStop) { try …
0
votes
1 answer

How to associate each user visiting a web app with a separate, temporary process allocated by a service?

I want to develop a web application using ASP.NET running on IIS. If a user submits a MAXIMA input command, the code behind will ask a custom windows service to create a new distinct temporary process executing an external assembly. More precisely,…
0
votes
1 answer

the didreaddata method is not called. Using asyncsocket

I wanna using asyncsocket to communicate between ios app with a windows server(coded by c++). ios send a packet to server is ok, but ios cann't read the packet from server. I have test the server code by client by c++, it works ok. Here is my part…
Jun
  • 15
  • 4