Skip to content

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

Description

@gbbnfhb

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));

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions