As far as I know, there is no ServerSocket function in Matlab so you are probably referring to an external class.
If you want to operate with sockets in Matlab, the proper way to do it is by using the tcpip
funcion:
socket=tcpip('0.0.0.0', 30000, 'NetworkRole', 'server')
From there you can listen and receive the data.