Homosociality is a term used in sociology, which describes a same-sex relationship which is not romantic or sexual in nature. These relationships might be called friendships, mentorships, or other. Heterosociality is the opposite. It means that one prefers socializing with members of the opposite sex without bringing romance or sex into the relationship. Eve Sedgwick made the term popular in her discussion of male homosocial desire, but Jean Lipman-Blumen had defined homosociality in 1976 as a preference for members of one's own sex.
For example, a close relationship between two men (such as George and Lennie in Of Mice and Men (and indeed most of the characters in that book) would be a homosocial relationship. It can apply to single sex schools, prisons, monasteries, but also to simple friendships.
The relationship can be a sexual one, but a homosocial relationship can occur between homosexuals, heterosexuals or both.
It is often used to describe the all-male world of medieval knights, or sailors. While it can apply to both men or women, it is most commonly used to refer to men.