+ssize_t recvfrom(int s, void *buf, size_t len, int flags,
+ struct sockaddr *from, socklen_t *fromlen);
+
+int recvfromSwift (Swift s, void *buf, size_t len, int flags,
+ struct sockaddr * __restrict__ from, socklen_t *fromlen)
+{
+ struct sockaddr_in si_other;
+ socklen_t slen=sizeof(si_other);
+
+ Dprintf("wait to receive messages");
+ return recvfrom(s->socketListener, buf, len, flags,
+ from, &slen);
+}
+
+int bindSwift(Swift s, const struct sockaddr *my_addr, socklen_t addrlen)
+{
+ Dprintf("bind swift socket");
+ return bind(s->socketListener,
+ (const struct sockaddr *)&s->socketListenerAddr,
+ sizeof(s->socketListenerAddr));
+}
+
+Swift socketSwift()
+{
+ Dprintf("create swift socket");
+ Swift s = calloc(1,sizeof(*s));