We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If the socket is busy reading the flow of the other operations are not performed . This Problem is, only mac os.
Dine sample code should write
fmt.Println ("byte")
but wrote in mac os X
At the same time in linux there is not any problems undelivered code .
It seems to me that the b, _: = conn2.Read (data2) blocks the flow in the mac os X but does not do it in linux
b, _: = conn2.Read (data2)
package main import ( "fmt" "net" ) var i = make(chan []byte) var is = make(chan []byte) func main() { go ch_reader() conn2, _ := net.Dial("tcp", "171.25.235.18:554") data := make([]byte, 8196) for { conn2.Write([]byte("DESCRIBE rtsp://171.25.235.18:554/mpeg4 RTSP/1.0\r\nCSeq: 1\r\n\r\n")) n, _ := conn2.Read(data) fmt.Println(string(data[:n])) conn2.Write([]byte("SETUP rtsp://171.25.235.18:554/mpeg4 RTSP/1.0\r\nCSeq: 1\r\nTransport: RTP/AVP/TCP;interleaved=0-1\r\n\r\n")) d, _ := conn2.Read(data) fmt.Println(string(data[:d])) conn2.Write([]byte("PLAY rtsp://171.25.235.18:554/mpeg4 RTSP/1.0\r\nCSeq: 1\r\n\r\n")) r, _ := conn2.Read(data) fmt.Println(string(data[:r])) data2 := make([]byte, 8196) for { b, _ := conn2.Read(data2) i <- data2[:b] } break } } func ch_reader() { for { fmt.Println("byte") req := <-i is <- req } }
The text was updated successfully, but these errors were encountered:
Your program does not make sense, since nothing ever reads from the channel "is". Your ch_reader function is going to stop after printing "byte" once.
What do you see on Mac OS, and what you do expect to see?
Sorry, something went wrong.
Timed out.
No branches or pull requests
If the socket is busy reading the flow of the other operations are not performed . This Problem is, only mac os.
Dine sample code should write
but wrote in mac os X
At the same time in linux there is not any problems undelivered code .
It seems to me that the
b, _: = conn2.Read (data2)
blocks the flow in the mac os X but does not do it in linuxThe text was updated successfully, but these errors were encountered: