Cameron Gutman
a89fcb8a46
Always use the test port
2020-08-29 19:14:53 -07:00
Cameron Gutman
9064d4931f
Add createSocket() helper to reduce code duplication
2020-08-29 18:54:11 -07:00
Cameron Gutman
5ddd53e17f
Enable media streaming mode for 802.11 WLAN interfaces on Windows
2020-08-11 22:12:58 -07:00
Cameron Gutman
117a7c637f
Switch to poll() to be safe against stack corruption from exceeding FD_SETSIZE
...
Fortunately, the fd_set definition is not prone to stack corruption on Windows,
because FD_SETSIZE is the maximum number of sockets in a fd_set, not
the maximum value socket file descriptor that can be stored in a fd_set.
https://beesbuzz.biz/code/5739-The-problem-with-select-vs-poll
2020-07-26 20:27:58 -07:00
Cameron Gutman
e938d84cdb
Use TCP_NOOPT to restrict MSS on BSD-based OSes
2019-12-01 15:22:18 -08:00
Cameron Gutman
ceab64c46b
Use IP_PMTUDISC_DONT to clamp MSS on Windows
2019-12-01 15:00:21 -08:00
Cameron Gutman
52f489bc46
Fix RTSP handshake errors on networks with broken PMTUD
2019-11-30 21:19:56 -06:00
Sunguk Lee
021a1b23e9
vita: Enable nonblock TCP socket
2019-11-04 02:47:41 +09:00
Cameron Gutman
25528671d2
Fix error value on control stream and RTSP handshake failure
2019-11-02 21:28:05 -07:00
Cameron Gutman
197594f38c
Add platform helper function to set socket non-blocking mode
2019-11-02 19:16:46 -07:00
Cameron Gutman
ea135be05a
Only test TCP ports if the hostname resolves to multiple addresses
2019-10-12 19:09:28 -07:00
Sunguk Lee
a5c1054742
vita: Remove more vita specific branches
2019-10-05 20:07:41 +09:00
Sunguk Lee
787700ca50
vita: Use getaddrinfo instead gethostbyname
2019-08-14 01:25:04 +09:00
Cameron Gutman
25dfbcfd41
Implement isPrivateNetworkAddress() for IPv6
2019-07-15 00:16:17 -07:00
Cameron Gutman
639ff18dbb
Allow automatic detection of remote streaming
2018-11-21 20:52:50 -08:00
Cameron Gutman
396b02a94d
Test each address returned in the getaddrinfo() call and stop blindly preferring IPv4
...
Fixes NAT64 on iOS 12 and probably other obscure configurations
2018-11-16 00:37:38 -08:00
Cameron Gutman
d9210a6a9a
Fix buffer overflow when connecting to an IPv4 address
2018-11-16 00:30:36 -08:00
Cameron Gutman
9396f6c528
Move resolveHostName() into PlatformSockets.c
2018-10-26 17:02:45 -07:00
Cameron Gutman
feb46b978e
Handle EINTR to fix streaming with GDB attached
2018-08-10 15:51:17 -07:00
Cameron Gutman
219d87486e
Check for both EWOULDBLOCK and EAGAIN for OSes where those values differ
2018-07-21 16:12:38 -07:00
Cameron Gutman
6e7965f013
Use SO_RCVTIMEO to avoid the overhead of an extra syscall per packet
2018-07-16 00:46:40 -07:00
Cameron Gutman
eaf3355c96
Reduce socket read timeout to 100 ms to allow LiStopConnection() to complete faster
2017-05-21 10:29:00 -07:00
Sunguk Lee
ba27e97698
Add vita environment ( #22 )
...
* vita: initial port
* vita: implement events, enable input thread
* vita: gethostbyname
* vita: Enable audio
* vita: Fix thread crash on discoonect process
* vita: Handle cannot create thread
* vita: now use newlib's socket apis
* vita: Refactoring for moonlight-stream/moonlight-common-c
* Fix review things
https://github.com/moonlight-stream/moonlight-common-c/pull/22#pullrequestreview-2436093
- vita may not support IPv6; so add LC_ASSERT them.
- define inet_ntop to sceNetInetNtop
- guard about failure of sceKernelCreateMutex or sceKernelCreateCond
- remove meanless macros
https://github.com/moonlight-stream/moonlight-common-c/pull/22#pullrequestreview-2444677
- !*mutex to *mutex
- remove useless LC_ASSERT then change to use inet_ntop
in vita system not defined `sockaddr_in6`, so just use `sockaddr_in` instead this.
https://github.com/moonlight-stream/moonlight-common-c/pull/22#pullrequestreview-2445642
- define sin6_addr
2016-10-05 16:43:33 -07:00
Cameron Gutman
dddcba217b
Try progressively lower receive buffer sizes until one is accepted
2016-05-08 12:10:04 -04:00
Cameron Gutman
48a5d63045
Reorganize the folder structure and delete the Xcode build files
2016-03-31 07:22:03 -04:00