CqlSharp.Protocol.FrameReader.ReadInetAsync C# (CSharp) 메소드

ReadInetAsync() 공개 메소드

Reads the inet async.
public ReadInetAsync ( ) : Task
리턴 Task
        public async Task<IPEndPoint> ReadInetAsync()
        {
            byte length = await ReadByteAsync().AutoConfigureAwait();

            if(!TryGetSegmentFromBuffer(length))
                await ReadSegmentAsync(length).AutoConfigureAwait();

            byte[] address = CopySegmentToArray();
            var ipAddress = new IPAddress(address);

            int port = await ReadIntAsync().AutoConfigureAwait();

            var endpoint = new IPEndPoint(ipAddress, port);

            return endpoint;
        }