Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# This file is part of Xpra. 

2# Copyright (C) 2019 Antoine Martin <antoine@xpra.org> 

3# Xpra is released under the terms of the GNU GPL v2, or, at your option, any 

4# later version. See the file COPYING for details. 

5 

6def get_client_protocol_class(socktype): 

7 if socktype=="udp": 

8 from xpra.net.udp_protocol import UDPClientProtocol 

9 return UDPClientProtocol 

10 if socktype in ("ws", "wss"): 

11 from xpra.net.websockets.protocol import WebSocketProtocol 

12 return WebSocketProtocol 

13 from xpra.net.protocol import Protocol 

14 return Protocol 

15 

16def get_server_protocol_class(socktype): 

17 if socktype=="udp": 

18 from xpra.net.udp_protocol import UDPServerProtocol 

19 return UDPServerProtocol 

20 if socktype in ("ws", "wss"): 

21 from xpra.net.websockets.protocol import WebSocketProtocol 

22 return WebSocketProtocol 

23 from xpra.net.protocol import Protocol 

24 return Protocol