RX API improvements

This commit is contained in:
Joseph Henry
2016-06-17 14:53:46 -07:00
parent 8fa7372e87
commit 53e71434f8
4 changed files with 100 additions and 78 deletions

View File

@@ -303,6 +303,8 @@ const char *get_netpath() {
#if defined(__UNITY_3D__)
// Just expose some basic calls for configuring and RX/TXing through ZT sockets
ssize_t zt_send(int fd, void *buf, int len)
{
return write(fd, buf, len);
@@ -313,17 +315,10 @@ const char *get_netpath() {
return read(fd, buf, len);
}
/*
ssize_t zt_send(int fd, struct UnityArrayInput *buf, int len)
{
return write(fd, buf->array, len);
}
ssize_t zt_recv(int fd, struct UnityArrayInput *buf, int len)
{
return read(fd, buf->array, len);
}
*/
int zt_set_nonblock(int fd)
{
return fcntl(fd, F_SETFL, O_NONBLOCK);
}
#endif
// ------------------------------------------------------------------------------