Update SocketAdapter example to remove demeter violation