// IO in the current thread for systems where Windows CancelIoEx API
// is available. Alternatively, it passes the request onto
// runtime netpoll and waits for completion or cancels request.
-func (s *ioSrv) ExecIO(o *operation, name string, submit func(o *operation) error) (int, error) {
+func (s *ioSrv) ExecIO(o *operation, submit func(o *operation) error) (int, error) {
if !canCancelIO {
onceStartServer.Do(startServer)
}
} else {
o := &fd.rop
o.InitBuf(buf)
- n, err = rsrv.ExecIO(o, "WSARecv", func(o *operation) error {
+ n, err = rsrv.ExecIO(o, func(o *operation) error {
return syscall.WSARecv(o.fd.Sysfd, &o.buf, 1, &o.qty, &o.flags, &o.o, nil)
})
if race.Enabled {
defer fd.readUnlock()
o := &fd.rop
o.InitBuf(buf)
- n, err := rsrv.ExecIO(o, "WSARecvFrom", func(o *operation) error {
+ n, err := rsrv.ExecIO(o, func(o *operation) error {
if o.rsa == nil {
o.rsa = new(syscall.RawSockaddrAny)
}
}
o := &fd.wop
o.InitBuf(buf)
- n, err = wsrv.ExecIO(o, "WSASend", func(o *operation) error {
+ n, err = wsrv.ExecIO(o, func(o *operation) error {
return syscall.WSASend(o.fd.Sysfd, &o.buf, 1, &o.qty, 0, &o.o, nil)
})
}
}
o := &fd.wop
o.InitBufs(buf)
- n, err := wsrv.ExecIO(o, "WSASend", func(o *operation) error {
+ n, err := wsrv.ExecIO(o, func(o *operation) error {
return syscall.WSASend(o.fd.Sysfd, &o.bufs[0], uint32(len(o.bufs)), &o.qty, 0, &o.o, nil)
})
o.ClearBufs()
o := &fd.wop
o.InitBuf(buf)
o.sa = sa
- n, err := wsrv.ExecIO(o, "WSASendto", func(o *operation) error {
+ n, err := wsrv.ExecIO(o, func(o *operation) error {
return syscall.WSASendto(o.fd.Sysfd, &o.buf, 1, &o.qty, 0, o.sa, &o.o, nil)
})
return n, err
func (fd *FD) ConnectEx(ra syscall.Sockaddr) error {
o := &fd.wop
o.sa = ra
- _, err := wsrv.ExecIO(o, "ConnectEx", func(o *operation) error {
+ _, err := wsrv.ExecIO(o, func(o *operation) error {
return ConnectExFunc(o.fd.Sysfd, o.sa, nil, 0, nil, &o.o)
})
return err
// Submit accept request.
o.handle = s
o.rsan = int32(unsafe.Sizeof(rawsa[0]))
- _, err := rsrv.ExecIO(o, "AcceptEx", func(o *operation) error {
+ _, err := rsrv.ExecIO(o, func(o *operation) error {
return AcceptFunc(o.fd.Sysfd, o.handle, (*byte)(unsafe.Pointer(&rawsa[0])), 0, uint32(o.rsan), uint32(o.rsan), &o.qty, &o.o)
})
if err != nil {