Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val mysocket: Stream[F,Socket[F]] =
- client(
- new InetSocketAddress(ip, port),
- reuseAddress,
- sendBufSize,
- recvBufSize,
- keepAlive,
- noDelay)
- def readFromSocket(s: Socket): Stream[F,Byte] = s.reads(None)
- mysocket.through(_.map(readFromSocket))
- > Stream[F, Stream[F,Byte]]
- (M[A], f: A => M[B]): M[B]
- mysocket.flatMap { (socket: Socket) =>
- socket.reads.through(socket.writes)
- }
Add Comment
Please, Sign In to add comment