Research Article

Routing in Mobile Opportunistic Social Networks with Selfish Nodes

Algorithm 2

SORSI message reception with selfishness detection.
procedure RECEIVEMESSAGE(,)
  if   .source() then
   .selfishScore()
   .setSelfishScore(-1)
   receive()
  else
   if  .selfishScore() then
     receive()
   else
      discard()
   end if
  end if
end procedure