Provide a 'connection has been reset rudely' callback
Fix the confusion between sd.err and s->s_error
Hopefully get the error handling on read/write correct now
At this point it seems to be behaving sanely.
struct sockdata {
void *socket;
- uint8_t err;
uint8_t ret;
uint8_t event; /* Waiting events to go to user space */
#define NEV_STATE 1
#define NE_ROOM 5
#define NE_DATA 6
#define NE_SHUTR 7
+#define NE_RESET 8
struct netevent {
uint8_t socket;
extern void netdev_init(void);
extern struct socket *sock_find(uint8_t type, uint8_t sv, struct sockaddrs *sa);
extern void sock_init(void);
-
+extern int sock_error(struct socket *s);
extern struct netdevice net_dev;
if (net_connect(s))
return -1;
if (sock_wait_leave(s, 0, SS_CONNECTING)) {
- /* API oddity, thanks Berkley */
+ /* API oddity, thanks Berkeley */
if (udata.u_error == EAGAIN)
udata.u_error = EINPROGRESS;
return -1;