Allow socket reuse
This commit is contained in:
		
							parent
							
								
									6949269ccc
								
							
						
					
					
						commit
						a0f1d494ac
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -12,6 +12,8 @@ bool socketError = false; | |||
| 
 | ||||
| int DDV_OpenUnix(const char adres[], bool nonblock = false){ | ||||
|   int s = socket(AF_UNIX, SOCK_STREAM, 0); | ||||
|   int on = 1; | ||||
|   setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); | ||||
|   sockaddr_un addr; | ||||
|   addr.sun_family = AF_UNIX; | ||||
|   strcpy(addr.sun_path, adres); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thulinma
						Thulinma