Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import std.stdio;
- import std.socket;
- import std.conv;
- Socket buildSocket()
- {
- Socket rawSock = new Socket(AddressFamily.INET,
- SocketType.RAW,
- ProtocolType.TCP);
- return rawSock;
- }
- void main()
- {
- auto rawSock = buildSocket();
- auto buf = new void[65656];
- auto got = rawSock.receive(buf);
- write(buf[0 .. got]);
- writeln();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement