Protocol is very simple: two netstrings are sent over TCP. First one holds desired filename extension, without the leading dot, up to 9 characters long. Second one is the paste data itself.
"hello world", no explicit extension => 0:,11:hello world, "http://example.com/", "url" extension => 3:url,18:http://example.com,