IO Completion Ports and socket send()

user4582812

Based on my understanding so far of IOCP, when I create a completion port and associate a socket to it, a notification will be sent to the completion port when a socket is ready to be read.

But how send() is handled, I mean if I want to send data, should I just call send()? what about the completion port, does it get any notification regarding send()?

Martin James

Based on my understanding so far of IOCP, when I create a completion port and associate a socket to it, a notification will be sent to the completion port when a socket is ready to be read.

NO! One advantage of the IOCP mechanism is that you can queue up read/write requests, with associated buffers, to the kernel and have a kernel threadpool perform the IO operations in kernel state. It's an I/O COMPLETION port, ie. you are notified upon operation completed.

If it's a read, you get your buffer, (pointer), back with the data already loaded - you don't have to explicitly read/copy it again.

If it's a write, the data has already gone and your returned buffer, (pointer). is free to be deleted/reused/repooled/whatever.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

IO Completion Ports and socket send()

From Dev

IO Completion Ports and socket WSARecv()

From Dev

IO Completion Ports and socket WSARecv()

From Dev

IO Completion Ports (IOCP)

From Dev

IO Completion Ports and OVERLAPPED management

From Dev

Asynchronous action methods and IO completion ports

From Dev

How to reregister for IO Completion ports for a handle

From Dev

io completion ports issue with calling multiple wsarecv or wsasend per GetQueuedCompletionStatus

From Dev

socket.io send packet to sender only

From Dev

How to send binary data with socket.io?

From Dev

socket.io send message twice

From Dev

Socket.io android library send method

From Dev

Socket.io how to send a message to anyone?

From Dev

socket.io don't send data

From Dev

Socket IO doesn't send array

From Dev

Android and Socket.io , send and receive data

From Dev

socket.io - can't send messages to a spesific room in a socket

From Dev

socket.io - socket.send doesn't communicate message

From Dev

Socket ports are not matching listening ports

From Dev

Multiple I/O Completion Ports

From Dev

Socket.io client requests fail when frontend and backend run on different ports

From Dev

How can I send socket.io messages to mongodb

From Java

How to send a message to a particular client with socket.io

From Dev

How to send data to specific client in a specific room with socket io

From Dev

How to send a message with WebSocket to a Socket.io server

From Dev

How to send acknowledgment from Socket.IO server?

From Dev

How to send response back to client using socket.io?

From Dev

socket.io: send message to specific room (client side)

From Dev

node.js socket.io cannot send to specific client

Related Related

HotTag

Archive