public InMemoryConnection CreateConnection(Encoding encoding = null) { var transportConnection = new InMemoryTransportConnection(_memoryPool, Context.Log, Context.Scheduler); _transportFactory.AddConnection(transportConnection); return(new InMemoryConnection(transportConnection, encoding)); }