multiplayer pong game for LPC 1768
Dependencies: mbed MbedJSONValue mbed-rtos Adafruit_ST7735 Adafruit_GFX EthernetInterface DebouncedInterrupt
network.cpp
- Committer:
- denizguler
- Date:
- 2020-11-10
- Revision:
- 13:95d44f7855ca
- Parent:
- 11:d0a105f6743f
- Child:
- 15:9d90f68e53da
File content as of revision 13:95d44f7855ca:
#include "network.h" void initEthernet(EthernetInterface *eth, UDPSocket *sock, Endpoint *nist) { eth->init(); //Use DHCP eth->connect(); sock->init(); nist->set_address(AWS_IP, PORT); sock->set_blocking(false, 0); } void cleanupEthernet(EthernetInterface *eth, UDPSocket *sock) { sock->close(); eth->disconnect(); }