Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- szymek
- Date:
- 2018-01-16
- Revision:
- 0:2feffe098612
File content as of revision 0:2feffe098612:
#include "mbed.h"
#include "EthernetInterface.h"
EthernetInterface net;
TCPSocket socket;
int main() {
net.connect();
const char *ip = net.get_ip_address();
socket.open(&net);
socket.connect("sl3.postio.pl", 5000);
char name[] = "name_set:qwerty";
int scount = socket.send(name, sizeof name);
char join[] = "room_join:eit";
scount = socket.send(join, sizeof join);
char send_c[] = "room_send:C";
socket.send(send_c, sizeof send_c);
socket.close();
net.disconnect();
}