Package dev.gmitch215.bytebox.socket


package dev.gmitch215.bytebox.socket
Raw outbound TCP, over cloudflare:sockets.

What this cannot reach decides whether it is the right tool. Cloudflare refuses a connection to its own IP ranges, to localhost and to private network addresses, and blocks port 25 outright. One consequence catches people out: smtp.mx.cloudflare.net is a Cloudflare address, so a Worker cannot SMTP to Cloudflare Email Sending even with valid credentials — use the EmailSender binding instead. External SMTP, IMAP and POP3 hosts are reachable.

Every plan allows six simultaneous outgoing connections, so a socket left open holds a sixth of the invocation's allowance. Socket is AutoCloseable for that reason.

Since:
1.0.0
  • Class
    Description
    One TCP connection.
    Raw outbound TCP, from cloudflare:sockets.
    One end of a WebSocket.
    The two ends of a WebSocket the Worker itself creates.