Commit Graph
164 Commits
Author SHA1 Message Date
Unknown W. Brackets 4ee9292d23 NetAdhoc: Fix warning. 2022-04-02 16:35:24 -07:00
ANR2ME 1a6c889906 Increase the timeout when the connection to the AdhocServer is already in progress, avoids cutting off the connection if it took longer than expected but almost completed. 2022-03-24 08:34:03 +07:00
ANR2ME d5152752d2 Added a function to get SO_ERROR on a socket. 2022-03-24 08:34:03 +07:00
ANR2ME 86315fed3d Updated getLocalIp function to detects local IP better. 2022-03-24 08:34:03 +07:00
ANR2ME 267757a5e4 Caches IP-specific Port Offset to avoid recalculating them. 2022-03-24 08:34:02 +07:00
ANR2ME 5e739f32b2 Use reference when possible to avoid copying. 2022-03-24 08:34:02 +07:00
ANR2ME 2b09f81ff8 Initialize some socket-related structs to avoid unexpected behavior. (May fix Unknown Source Port issue) 2022-03-24 08:34:02 +07:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
ANR2ME 0755dc0bbd Updated notifyMatchingHandler comments 2022-01-20 03:00:23 +07:00
ANR2ME 3b8eb6b04e Added a note regarding FIONREAD behavior on different platforms. 2021-12-08 08:49:35 +07:00
ANR2ME 5b010afff3 oops need to typecast metasocket 2021-09-28 20:44:03 +07:00
ANR2ME 9a714249a6 Changing most frequently used global vars to atomic to avoid possible multi-threading issue on friendFinder thread which communicates with AdhocServer in background.
PS: There are more global vars being used here (too many actually), so we should find a better approach in the future (ie. using PSPThread instead).
2021-09-28 20:44:03 +07:00
ANR2ME 15d3e69c4c Fix possible crash issue 2021-09-23 12:22:57 +07:00
Henrik RydgårdandGitHub b8ea95bec1 Merge pull request #14904 from ANR2ME/adhoc
[Adhoc] Do not resolve Pro Adhoc Server address when WLAN is turned off
2021-09-21 13:46:12 +02:00
ANR2ME 4e8a9fda63 Do not resolve Pro Adhoc Server address when WLAN is turned off 2021-09-21 17:12:01 +07:00
ANR2ME ee7383193b Fix race condition issue on AdhocMatching 2021-09-21 15:32:41 +07:00
ANR2ME 2bda9c1c84 Keep tracks of the sender/source port on GameMode for further communication, in case it was remapped by router or ISP for some reason. 2021-09-19 10:55:03 +07:00
Unknown W. Brackets c79bb6ba71 Net: Fix various chat threading hazards. 2021-09-14 18:08:17 -07:00
Unknown W. Brackets 9403947b67 UI: Decouple new chat display and tracking logic. 2021-09-14 18:08:16 -07:00
Unknown W. Brackets be0b0cd88d UI: Track chat log changes more clearly.
This also makes it easier to have multiple views or etc. reading from it.
We want data flowing a single direction, chat system -> UI.
2021-09-14 18:08:16 -07:00
iota97 4205ce7c42 Trim username on join as well 2021-07-26 21:11:21 +02:00
ANR2ME 7a06103cc6 Create GameMode's socket after Master and all Replicas have been created so we will know the largest buffer size. 2021-05-31 04:37:09 +07:00
Henrik RydgårdandUnknown W. Brackets f4a6d291e1 Common: Capitalize setCurrentThreadName(). 2021-04-30 23:02:36 -07:00
ANR2ME 206ab4345e Attempts to reconnect to Adhoc Server only when Creating/Joining/Connecting to a group or Scanning for groups, instead of on 2 seconds interval. 2021-04-02 12:19:02 +07:00
ANR2ME e508885cc4 Show the socket error code when failed to connect to adhoc server 2021-04-02 12:18:59 +07:00
ANR2ME e3228ca1b5 Use a function to check for loopback address 2021-04-02 12:18:12 +07:00
M4xwandUnknown W. Brackets 4cc322466a Switch: Workaround several missing toolchain defs. 2021-03-04 21:24:57 -08:00
ANR2ME 36a9fb7645 Replacing the deprecated gethostbyname function with getaddrinfo function to prevent getting deprecated warnings 2021-03-01 01:45:28 +07:00
ANR2ME 758fb12fc3 Making sure there are no warnings related to deprecated inet_ntoa function 2021-03-01 01:45:27 +07:00
ANR2ME cb61b34b53 Minor changes. 2021-02-21 20:05:50 +07:00
Unknown W. Brackets 9d22297a90 Windows: Use CommonWindows more consistently.
Also, make sure WinSock2.h is included beforehand where it's needed.
2021-02-14 10:30:10 -08:00
ANR2ME 0ce2c2c6e9 Windows recvfrom doesn't support MSG_TRUNC, so we're using dummy buffer with max size as alternative for peeking actual size of the next pending message. 2021-02-11 07:40:35 +07:00
ANR2ME 04434ea68e Fix possible race condition issue. 2021-02-05 21:54:00 +07:00
ANR2ME 79c30ee716 We don't really need to allocate a buffer when using MSG_TRUNC on recvfrom 2021-02-05 21:53:59 +07:00
ANR2ME 849fe4ade1 Updated PdpStat to prevent rcv_sb_cc from exceeding the buffer size arg (since we use larger buffer size to prevent micro stutters or disconnection issue due to too many dropped packets with small buffer size).
TODO: May need to improve it to be able to calculate the correct size if there are multiple datagram messages
2021-02-04 10:31:01 +07:00
ANR2ME d907906c74 Fix connection issue on Dynasty Warriors (Shin Sangoku Musou) games when playing with more than 2 players. 2021-01-30 15:20:24 +07:00
ANR2ME dbce1a4c1d Prevent access violation when running out of userMemory due to piling up AdhocMatching events. 2021-01-09 00:55:11 +07:00
ANR2ME b10797db95 Fixed an issue where sometimes a player unable to join a host on Warriors Orochi 2 (should also fix similar issue on other games that use PDP/UDP on Windows) 2020-12-25 00:27:35 +07:00
ANR2ME 38d887ce88 Change socket's MSS based on PSP_ADHOC_PTP_MSS 2020-11-16 19:03:11 +07:00
ANR2ME f30c61849b Making use TCP_QUICKACK (or it's alternative) along with TCP_NODELAY 2020-11-16 19:03:09 +07:00
ANR2ME 4eca124710 Blocks current thread to synchronize initial GameMode data. Fixes desync issue when GameMode multiplayer mission is being started. 2020-10-29 06:08:51 +07:00
ANR2ME 399f56f73b Implementing Adhocctl Busy state to prevent getting kicked out from Adhoc Server on games that tries to leave the group multiple times in a row.
Also Updated Adhocctl behavior.
2020-10-29 06:04:22 +07:00
ANR2ME 0157fe4988 Updated GameMode API (Fixed Pocket Pool) 2020-10-29 06:00:16 +07:00
ANR2ME bff18c07d0 Fixed unable to see game room issue on Air Conflicts - Aces Of World War 2, should also fix other games with similar issue (due to invalid group mode) 2020-10-29 06:00:16 +07:00
ANR2ME 0363319f14 Prevent Scanning issue after reconnected to AdhocServer, also Updated logging to showing the error code on sceNetAdhocctlScan 2020-10-29 06:00:15 +07:00
ANR2ME 30b9f46aa5 Don't need to connect if AdhocServer IP is the same with this instance localhost IP and having AdhocServer disabled 2020-10-19 23:34:47 +07:00
ANR2ME 88ebed4c02 Prevent AdhocServer Pings from spamming Debug Log 2020-10-16 12:23:20 +07:00
Henrik Rydgård b3deaab963 VS 2017 buildfix hack - these parameters are new to Windows.
Thanks autechre.
2020-10-14 23:15:49 +02:00
ANR2ME 00b11115bb Fixed timeout issue due to the latest CoreTiming::GetGlobalTimeUsScaled() have a possibility to get smaller number than the previous one. 2020-10-11 13:34:30 +07:00
ANR2ME 8b2073cd7f Prevent Dissidia 012 from opening too many ports when failed to connect continuously. 2020-10-10 01:00:32 +07:00