Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cs733
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sushant Mahajan
cs733
Commits
822803dd
Commit
822803dd
authored
Jan 26, 2015
by
Sushant Mahajan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unnecary file
parent
92b61e81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
67 deletions
+0
-67
assignment1/client.go
assignment1/client.go
+0
-67
No files found.
assignment1/client.go
deleted
100644 → 0
View file @
92b61e81
package
main
import
(
//"bufio"
"fmt"
"net"
//"os"
"strconv"
//"time"
)
var
die
bool
func
doRead
(
conn
net
.
Conn
)
{
for
{
buf
:=
make
([]
byte
,
1024
)
_
,
err
:=
conn
.
Read
(
buf
)
if
err
!=
nil
{
fmt
.
Println
(
"Server closed connection"
)
die
=
true
break
}
fmt
.
Println
(
string
(
buf
))
}
}
func
tempmain
()
{
conn
,
err
:=
net
.
Dial
(
"tcp"
,
"localhost:5000"
)
die
=
false
//go doRead(conn)
//time.Sleep(time.Second*10)
if
err
!=
nil
{
fmt
.
Println
(
"Err:"
,
err
)
}
for
i
:=
0
;
i
<
100
;
i
++
{
data
:=
make
([]
byte
,
1024
)
conn
.
Write
([]
byte
(
"set abc"
+
strconv
.
Itoa
(
i
)
+
" 200 10
\r\n
abcd
\n
kefgh
\r\n
"
))
//time.Sleep(time.Millisecond)
n
,
err
:=
conn
.
Read
(
data
)
//fmt.Println(data[:n], err)
if
err
==
nil
{
fmt
.
Println
(
string
(
data
[
:
n
]))
}
}
//reader := bufio.NewReader(os.Stdin)
//for {
// if die {
// break
// }
// msg, err := reader.ReadString('\n')
// if err != nil {
// fmt.Println("Err: ", err)
// }
// fmt.Println(msg)
// buf := []byte(msg)[0 : len(msg)-1]
// buf = append(buf, []byte("\r\n")...)
// fmt.Println(len(buf))
// conn.Write(buf)
//}
conn
.
Close
()
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment