You were reading both things into the same string.
Server was read into the string starting at the first position.
"the server"
Then you read port into the same string starting at second position which was overwriting most of the server and showing you the first letter of the server then port for server and port is correct since you read and retrieved both from second position.
"t27015"
"27015"