ps4link icon indicating copy to clipboard operation
ps4link copied to clipboard

Previously, the socket could not be reconnected immediately, so I have fixed it.

Open gbbnfhb opened this issue 11 months ago • 0 comments

void ps4link_commands_thread(void args) and void *ps4link_requests_thread(void * args)

/* Enable address reuse */
int on = 1;  //<---add
setsockopt ( ps4LinkGetValue(REQUESTS_SOCK or COMMANDS_SOCK), SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on) );   //<---add

/* Fill the server's address */
//serveraddr.sin_len = 16;
serveraddr.sin_family = 2;
serveraddr.sin_addr.s_addr = sceNetHtonl(INADDR_ANY);
serveraddr.sin_port = sceNetHtons(ps4LinkGetValue(REQUESTS_PORT));
memset(serveraddr.sin_zero, 0, sizeof(serveraddr.sin_zero));

/* Bind the server's address to the socket */
ret = sceNetBind(ps4LinkGetValue(REQUESTS_SOCK), (struct sockaddr *)&serveraddr, sizeof(serveraddr));

gbbnfhb avatar Feb 16 '25 06:02 gbbnfhb