English 中文(简体)
NOde.js TCP 输入缓冲
原标题:Node.js TCP input buffering

我还不确定我是否是正确的,但据我理解,当我在 < code> data < / code> 事件上附加一个处理器时,它给我所有的数据,直到那时为止。问题是,我如何处理缓冲数据的问题,因为Node.js每次可能给我更少的4字节(这是至少我需要的),特别是当会有多个同时提出的请求时?

最佳回答
问题回答

暂无回答




相关问题
Checking a local TCP port is not open in Java

Is there a simple way to make sure that a local port is not already open. Some TCP socket servers (eg Grizzly) don t seem to do this check by default. When this check is missing, the server appears ...

Client/Server: Integer always received as 1 (C-programming)

I m building a client and a server program that exchanges data over TCP and I m having trouble sending an ACK-confirmation from the server back to the client when an operation is successfull. I ve ...

Long Lived Persistent TCP Connection on the Android

I ve read some articles on the web and some questions on StackOverFlow, but no one seems to have a definite answer over a) If google uses Long Lived TCP connections for Gmail, Mail etc, and b) If ...

Maintaining many socket connections with a single thread

Many tutorials on socket communication I see seem to use 1 thread per socket. But on a server used for online gaming, you might have 10k concurrent users - 10k threads isn t probably a wonderful idea. ...

SSL_accept with blocking socket

I made a server with SSL and blocking sockets. When I connect with telnet (so it does not do the handshake), the SSL_accept blocks indefinitely and blocks every new handshake/accept (and by definition ...

How to list all devices in my wifi range in iphone

I am using the reachability code from apple to find if my iphone is connected to the wifi. Next i would like to list all the devices that are in my wifi range. How should i do this. The other devices ...

Sending struct over TCP (C-programming)

I have a client and server program where I want to send an entire struct from the client and then output the struct member "ID" on the server. I have done all the connecting etc and already managed ...

Idle tcp file descriptor after failed connect on HPUX

I have a client tcp socket (in c++) that has a loop where it retries to open a socket and connect to a server at a certain interval until it succeeds. A bug in the program caused close not to be ...

热门标签