Skip to content

Instantly share code, notes, and snippets.

@moonpolysoft
Created March 21, 2011 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moonpolysoft/879937 to your computer and use it in GitHub Desktop.
Save moonpolysoft/879937 to your computer and use it in GitHub Desktop.
http | http_bin
The Hypertext Transfer Protocol. The packets are returned with the format according to HttpPacket described in erlang:decode_packet/3. A socket in passive mode will return {ok, HttpPacket} from gen_tcp:recv while an active socket will send messages like {http, Socket, HttpPacket}.
Note that the packet type httph is not needed when reading from a socket.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment