User Tools

Site Tools


digic:processors:lime

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
digic:processors:lime [2021/03/07 14:58] – Include signatures jack001214digic:processors:lime [2021/03/07 15:09] – [Misc] jack001214
Line 145: Line 145:
 </code> </code>
 ==== Misc ==== ==== Misc ====
 +^   Socket  ^^^
 +^Option^Value^Info^
 +|AF_INET|0x1|Internet IP Protocol|
 +
 ^   Socket Options   ^^^ ^   Socket Options   ^^^
 ^Option^Value^Info^ ^Option^Value^Info^
 |SOL_SOCKET|0xffff|options at the socket level| |SOL_SOCKET|0xffff|options at the socket level|
 |SO_REUSEADDR| 0x2|allow reuse of local addresses| |SO_REUSEADDR| 0x2|allow reuse of local addresses|
 +
 +''socket_bind'' and ''socket_connect'' takes in three parameters. The array which is passed in should look like this:
 +<code>
 +char sockaddr[8];
 +
 +// 1 = IPv4, 2 = IPv6, 3 = Ethernet
 +sockaddr[0] = 0x00;
 +sockaddr[1] = 0x01;
 +
 +// port 25565
 +sockaddr[2] = 0x63; // low byte
 +sockaddr[3] = 0xdd; // high byte
 +
 +// ip address: 192.168.10.22
 +sockaddr[4] = 192;
 +sockaddr[5] = 168;
 +sockaddr[6] = 10;
 +sockaddr[7] = 22;
 +</code>
 +<code>
 +socket_bind(sock,sockaddr, 0x8)
 +socket_connect(sock,sockaddr, 0x8)
 +</code>
 +
 +
 +
  
digic/processors/lime.txt · Last modified: 2021/03/16 12:01 by coon