Question: Tried to paste the code from one book (TCP/IP learning) to send a message from client to server. But nothing happens, except the message "The server is ready to receive".

Server code:

```
from socket import *

serverPort = 12000
serverSocket = socket(AF_INET, SOCK_STREAM)
serverSocket.bind(('', serverPort))
serverSocket.listen(1)

print('The server is ready to receive')

while 1:
    connectionSocket, addr = serverSocket.accept()
    sentence = connectionSocket.recv(1024)
    capitalizedSentence = sentence.upper()
    connectionSocket.send(capitalizedSentence)
    connectionSocket.close()

```

Client code:

```
from socket import *

serverName = '0.0.0.0.0'
serverPort = 12000
clientSocket = socket(AF_INET, SOCK_STREAM)

clientSocket.connect((serverName, serverPort))
sentence = input('Input lowercase sentence: ')
clientSocket.send(sentence)
modifiedSentence = clientSocket.recv(1024)

print('From Server: ', modifiedSentence)
clientSocket.close()

```

Answer: 
You entered the wrong server name. The server name is actually the IP address, and `0.0.0.0.0` is not a valid IP address.  

Try changing 

```
serverName = '0.0.0.0.0' -> '0.0.0.0' or '127.0.0.1'

```
The value for *serverName* is not a valid IP address ('0.0.0.0.0'). Try `0.0.0.0` instead.

If you want to check for a valid IP address beforehand, try this.

```
if re.match(r'[0-9]+(?:\.[0-9]+){3}', input_string):
    serverName = input_string  # True, valid
else:
    print('Invalid IP Address')

```