Whenever I try to send a negative number over a TCP socket, when I print what was received,it reads "4.29497e+09". All I'm doing is this:

```
int i = -8;
int temp = htonl(i);
write(sock,&temp,4);

```

On the Server:

```
int temp;
read(sock, &temp,4);
int read = ntohl(temp);
cout << read << endl;

```

If anyone could help, it would be much appreciated.