SocketOptions.hx 611 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package asys.net;
  2. /**
  3. See `Socket.create`.
  4. **/
  5. typedef SocketOptions = {
  6. // ?file:asys.io.File, // fd in Node
  7. ?allowHalfOpen:Bool,
  8. ?readable:Bool,
  9. ?writable:Bool
  10. };
  11. /**
  12. See `Socket.connectTcp`.
  13. **/
  14. typedef SocketConnectTcpOptions = {
  15. port:Int,
  16. ?host:String,
  17. ?address:Address,
  18. ?localAddress:Address,
  19. ?localPort:Int,
  20. ?family:IpFamily
  21. };
  22. /**
  23. See `Socket.connectIpc`.
  24. **/
  25. typedef SocketConnectIpcOptions = {
  26. path:String
  27. };
  28. /**
  29. See `UdpSocket.create`.
  30. **/
  31. typedef UdpSocketOptions = {
  32. ?reuseAddr:Bool,
  33. ?ipv6Only:Bool,
  34. ?recvBufferSize:Int,
  35. ?sendBufferSize:Int,
  36. // ?lookup:DnsLookupFunction
  37. };